Files
swift-mirror/test/basic/parse_in_library.swift
Doug Gregor faf1c45d14 Shuffle the files in the testsuite a bit to try to reflect language structure.
There's a lot more work to do here, but start to categorize tests
along the lines of what a specification might look like, with
directories (chapters) for basic concepts, declarations, expressions,
statements, etc.


Swift SVN r9958
2013-11-05 15:12:57 +00:00

7 lines
213 B
Swift

// RUN: %swift %s -parse-as-library -verify
print(10) // expected-error {{expressions are not allowed at the top level}}
if true { // expected-error {{statements are not allowed at the top level}}
print(10)
}