mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
A parse-only option is needed for parse performance tracking and the current option also includes semantic analysis.
17 lines
485 B
Swift
17 lines
485 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
#if 0 // expected-error {{'0' is not a valid conditional compilation expression, use 'false'}} {{5-6=false}}
|
|
let x = 1
|
|
#endif
|
|
|
|
#if 1 // expected-error {{'1' is not a valid conditional compilation expression, use 'true'}} {{5-6=true}}
|
|
let x = 1
|
|
#endif
|
|
|
|
|
|
// expected-error@+1{{invalid conditional compilation expression}}
|
|
#if 6
|
|
var u: V { didSet {} }
|
|
|
|
// expected-error@+1{{expected #else or #endif at end of conditional compilation block}}
|