Files
swift-mirror/test/Parse/ConditionalCompilation/endif-on-end-of-file.swift
Doug Gregor 823c24b355 [SE-0112] Rename ErrorProtocol to Error.
This is bullet (5) of the proposed solution in SE-0112, and the last
major piece to be implemented.
2016-07-12 10:53:52 -07:00

18 lines
384 B
Swift

// RUN: %target-parse-verify-swift
#if DEBUG
#endif ; // expected-error {{extra tokens following conditional compilation directive}}
// <rdar://problem/17569958> #endif not parsed correctly when occurs as last line in file
#if DEBUG
func debug(msg: String) {
print(msg)
}
#else
func debug(msg: String) {
}
// last line of file - make sure no \n sneaks in below #endif.
#endif