Files
swift-mirror/test/Parse/identifiers.swift
John McCall 426510cd4e Create an ErrorExpr when expression parsing consumes tokens
but doesn't build anything.

I have no idea why this test case needed to change.

Swift SVN r27897
2015-04-29 00:23:15 +00:00

28 lines
821 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// RUN: %target-parse-verify-swift
class {
class שלום {
class {
class Γειά {
class func привет() {
println("hello")
}
}
}
}
}
.שלום..Γειά.привет()
// Identifiers cannot start with combining chars.
.́duh() // expected-error 2{{an identifier cannot begin with this character}} // expected-error{{expected identifier after '.' expression}}
// Combining characters can be used within identifiers.
func s̈pin̈al_tap̈() {}
// Private-use characters aren't valid in Swift source.
() // expected-error{{invalid character in source file}}
// Placeholders are recognized as identifiers but with error.
func <#some name#>() {} // expected-error 2 {{editor placeholder in source file}}