|
2 | 2 | // RUN: not %target-swiftc_driver -swift-version 1 %s 2>&1 | %FileCheck --check-prefix BAD %s |
3 | 3 | // RUN: not %target-swiftc_driver -swift-version 2 %s 2>&1 | %FileCheck --check-prefix BAD %s |
4 | 4 | // RUN: not %target-swiftc_driver -swift-version 2.3 %s 2>&1 | %FileCheck --check-prefix BAD %s |
5 | | -// RUN: not %target-swiftc_driver -swift-version 7 %s 2>&1 | %FileCheck --check-prefix BAD %s |
6 | | -// RUN: not %target-swiftc_driver -swift-version 7.2 %s 2>&1 | %FileCheck --check-prefix BAD %s |
7 | 5 | // RUN: not %target-swiftc_driver -swift-version 3.0 %s 2>&1 | %FileCheck --check-prefix BAD %s |
8 | 6 | // RUN: not %target-swiftc_driver -swift-version 3.3 %s 2>&1 | %FileCheck --check-prefix BAD %s |
9 | 7 | // RUN: not %target-swiftc_driver -swift-version 4.3 %s 2>&1 | %FileCheck --check-prefix BAD %s |
10 | 8 | // RUN: not %target-swiftc_driver -swift-version 5.1 %s 2>&1 | %FileCheck --check-prefix BAD %s |
11 | 9 |
|
12 | 10 | // RUN: not %target-swiftc_driver -swift-version 4 -typecheck %s 2>&1 | %FileCheck --check-prefix ERROR_4 %s |
13 | 11 | // RUN: not %target-swiftc_driver -swift-version 5 -typecheck %s 2>&1 | %FileCheck --check-prefix ERROR_5 %s |
| 12 | +// RUN: not %target-swiftc_driver -swift-version 6 -typecheck %s 2>&1 | %FileCheck --check-prefix ERROR_6 %s |
14 | 13 |
|
15 | 14 | // BAD: invalid value |
16 | | -// BAD: note: valid arguments to '-swift-version' are '4', '4.2', '5' |
| 15 | +// BAD: note: valid arguments to '-swift-version' are '4', '4.2', '5', '6' |
17 | 16 |
|
18 | 17 | #if swift(>=3) |
19 | 18 | asdf |
20 | 19 | // ERROR_4: [[@LINE-1]]:1: error: {{cannot find 'asdf' in scope}} |
21 | 20 | // ERROR_5: [[@LINE-2]]:1: error: {{cannot find 'asdf' in scope}} |
| 21 | +// ERROR_6: [[@LINE-3]]:1: error: {{cannot find 'asdf' in scope}} |
22 | 22 | #else |
23 | 23 | jkl |
24 | 24 | #endif |
|
27 | 27 | asdf |
28 | 28 | // ERROR_4: [[@LINE-1]]:1: error: {{cannot find 'asdf' in scope}} |
29 | 29 | // ERROR_5: [[@LINE-2]]:1: error: {{cannot find 'asdf' in scope}} |
| 30 | +// ERROR_6: [[@LINE-3]]:1: error: {{cannot find 'asdf' in scope}} |
30 | 31 | #else |
31 | 32 | jkl |
32 | 33 | #endif |
|
35 | 36 | asdf |
36 | 37 | // ERROR_4: [[@LINE-1]]:1: error: {{cannot find 'asdf' in scope}} |
37 | 38 | // ERROR_5: [[@LINE-2]]:1: error: {{cannot find 'asdf' in scope}} |
| 39 | +// ERROR_6: [[@LINE-3]]:1: error: {{cannot find 'asdf' in scope}} |
38 | 40 | #else |
39 | 41 | jkl |
40 | 42 | #endif |
|
43 | 45 | asdf |
44 | 46 | // ERROR_4: [[@LINE-1]]:1: error: {{cannot find 'asdf' in scope}} |
45 | 47 | // ERROR_5: [[@LINE-2]]:1: error: {{cannot find 'asdf' in scope}} |
| 48 | +// ERROR_6: [[@LINE-3]]:1: error: {{cannot find 'asdf' in scope}} |
46 | 49 | #else |
47 | 50 | jkl |
48 | 51 | #endif |
49 | 52 |
|
50 | 53 | #if swift(>=5) |
51 | 54 | asdf |
52 | 55 | // ERROR_5: [[@LINE-1]]:1: error: {{cannot find 'asdf' in scope}} |
| 56 | +// ERROR_6: [[@LINE-2]]:1: error: {{cannot find 'asdf' in scope}} |
53 | 57 | #else |
54 | 58 | jkl |
55 | 59 | // ERROR_4: [[@LINE-1]]:1: error: {{cannot find 'jkl' in scope}} |
56 | 60 | #endif |
| 61 | + |
| 62 | +#if swift(>=6) |
| 63 | +asdf |
| 64 | +// ERROR_6: [[@LINE-1]]:1: error: {{cannot find 'asdf' in scope}} |
| 65 | +#else |
| 66 | +jkl |
| 67 | +// ERROR_5: [[@LINE-1]]:1: error: {{cannot find 'jkl' in scope}} |
| 68 | +// ERROR_4: [[@LINE-2]]:1: error: {{cannot find 'jkl' in scope}} |
| 69 | +#endif |
0 commit comments