mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
diagnostics over to it. There are a few differences between this diagnostic engine and Clang's engine: - Diagnostics are specified by a .def file (Diagnostics.def), rather than via tblgen, which drastically simplifies the build and makes code completion work when you add a new diagnostic. - Calls to the "diagnose()" method are safely typed based on the argument types specified in the .def file, so it's harder to write a diagnostic whose expected arguments (in the string) and whose actual arguments (in the code) don't match. - It uses variadic templates, so it hangs with the cool kids. Swift SVN r734
6 lines
113 B
Swift
6 lines
113 B
Swift
// RUN: %swift %s -verify
|
|
|
|
func f0() {
|
|
import swift; // expected-error{{import is only valid at file scope}}
|
|
}
|