mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
* Don't emit duplicated 'expected #else or #endif at end of conditional
compilation block' error.
class Foo {
#if true
func foo() {}
[EOF]
* Improve error message when seeing '}' in config block.
class Foo {
#if true
func foo();
} // error: unexpected '}' in conditional compilation block
#else
#endif
8 lines
263 B
Swift
8 lines
263 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
class C2 { // expected-note {{to match this opening '{'}}
|
|
#if FOO
|
|
func foo() {}
|
|
// expected-error @+2 {{expected '}' in class}}
|
|
// expected-error @+1 {{expected #else or #endif at end of conditional compilation block}}
|