mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
50 lines
1.0 KiB
Swift
50 lines
1.0 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %swiftc_driver_plain -target %target-triple -module-cache-path %t -typecheck -Xfrontend -verify %s
|
|
|
|
// This test should be updated to match the expected default Swift version
|
|
// when swiftc is invoked directly.
|
|
// It should /not/ follow the version specified when invoking lit, which means
|
|
// it can't use the %swiftc_driver or %target-build-swift substitutions.
|
|
|
|
#if swift(>=3)
|
|
asdf // expected-error {{cannot find 'asdf' in scope}}
|
|
#else
|
|
jkl
|
|
#endif
|
|
|
|
#if swift(>=3.1)
|
|
asdf // expected-error {{cannot find 'asdf' in scope}}
|
|
#else
|
|
jkl
|
|
#endif
|
|
|
|
#if swift(>=4)
|
|
aoeu // expected-error {{cannot find 'aoeu' in scope}}
|
|
#else
|
|
htn
|
|
#endif
|
|
|
|
#if swift(>=4.1)
|
|
aoeu // expected-error {{cannot find 'aoeu' in scope}}
|
|
#else
|
|
htn
|
|
#endif
|
|
|
|
#if swift(>=4.2)
|
|
aoeu // expected-error {{cannot find 'aoeu' in scope}}
|
|
#else
|
|
htn
|
|
#endif
|
|
|
|
#if swift(>=5)
|
|
aoeu // expected-error {{cannot find 'aoeu' in scope}}
|
|
#else
|
|
htn
|
|
#endif
|
|
|
|
#if swift(>=6)
|
|
aoeu
|
|
#else
|
|
htn // expected-error {{cannot find 'htn' in scope}}
|
|
#endif
|