-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Remove -swift-version 3 from a handful of tests and update them appro… #17748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// RUN: %target-typecheck-verify-swift | ||
|
||
func test1(_: ()) {} // expected-note {{'test1' declared here}} | ||
test1() // expected-error {{missing argument for parameter #1 in call}} | ||
|
||
enum Result<T> { | ||
case success(T) // expected-note {{'success' declared here}} | ||
} | ||
func test3(_: Result<()>) {} | ||
test3(.success()) // expected-error {{missing argument for parameter #1 in call}} | ||
|
||
func toString(indexes: Int?...) -> String { | ||
let _ = indexes.reduce(0) { print($0); return $0.0 + ($0.1 ?? 0)} | ||
// expected-error@-1 {{contextual closure type '(_, Int?) throws -> _' expects 2 arguments, but 1 was used in closure body}} | ||
let _ = indexes.reduce(0) { (true ? $0 : (1, 2)).0 + ($0.1 ?? 0) } | ||
// expected-error@-1 {{contextual closure type '(_, Int?) throws -> _' expects 2 arguments, but 1 was used in closure body}} | ||
_ = ["Hello", "Foo"].sorted { print($0); return $0.0.count > ($0).1.count } | ||
// expected-error@-1 {{argument passed to call that takes no arguments}} | ||
} | ||
|
||
func doit(_ x: Int) -> Bool { return x > 0 } | ||
let _: ((String, Int)) -> [String:Bool] = { [$0: doit($1)] } | ||
// expected-error@-1 {{closure tuple parameter '(String, Int)' does not support destructuring with implicit parameters}} | ||
func returnClosure() -> ((Int, Int)) -> Bool { return {$1 > $0} } | ||
// expected-error@-1 {{closure tuple parameter '(Int, Int)' does not support destructuring with implicit parameters}} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// This source file is part of the Swift.org open source project | ||
// | ||
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors | ||
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this really necessary? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Copyright dates should be updated when files are updated. I had the same updates you had plus this, so I kept this as part of the rebase. |
||
// Licensed under Apache License v2.0 with Runtime Library Exception | ||
// | ||
// See https://swift.org/LICENSE.txt for license information | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did these completions go away? Is it a bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked that same question of @benlangmuir on the other PR. I haven't had a chance to look into it at all, but if it's unexpected we can open a JIRA and look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed a radar about it already but I thought you determined the change was correct. Until we find out can you leave this test as is for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slavapestov I'm not planning on merging anything until @benlangmuir has a chance to reply to my question below.