Skip to content

Commit 5a02541

Browse files
committed
Fork tuple_arguments test for Swift 5.
Move the existing test into Compatibility/tuple_arguments_4.swift. Move the Swift 3 test, Compatibility/tuple_arguments.swift, into Compatibility/tuple_arguments_4.swift. Add a couple new tests to each file to capture what we do in each mode. Overall this doesn't seem like the most satisfying approach for covering compatibility testing in our standard commit testing, but it's all we've got at the moment.
1 parent 6310aca commit 5a02541

File tree

3 files changed

+1693
-7
lines changed

3 files changed

+1693
-7
lines changed

test/Compatibility/tuple_arguments.swift renamed to test/Compatibility/tuple_arguments_3.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// RUN: %target-typecheck-verify-swift -swift-version 3
22

33
// Tests for tuple argument behavior in Swift 3, which was broken.
4-
// The Swift 4 test is in test/Constraints/tuple_arguments.swift.
4+
// The Swift 4 test is in test/Compatibility/tuple_arguments_4.swift.
5+
// The test for the most recent version is in test/Constraints/tuple_arguments.swift.
56

67
// Key:
78
// - "Crashes in actual Swift 3" -- snippets which crashed in Swift 3.0.1.
@@ -1526,4 +1527,10 @@ do {
15261527

15271528
func logNoOptional<T>() -> (T) -> Void { }
15281529
f(a: logNoOptional() as ((()) -> Void)) // Also allow the optional-injected form.
1530+
1531+
func g() {}
1532+
g(())
1533+
1534+
func h(_: ()) {}
1535+
h()
15291536
}

0 commit comments

Comments
 (0)