Files
swift-mirror/test/Parse/ConditionalCompilation/decl_parse_errors-2.swift
Rintaro Ishizaki cfe742d1eb [Parse] Minor improvements in conditional compilation block parsing
* 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
2017-02-16 11:35:51 +09:00

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}}