mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
A parse-only option is needed for parse performance tracking and the current option also includes semantic analysis.
24 lines
387 B
Swift
24 lines
387 B
Swift
// RUN: %target-typecheck-verify-swift -swift-version 3
|
|
|
|
// Dollar is allowed as an identifier head in Swift 3.
|
|
|
|
func dollarVar() {
|
|
var $ : Int = 42 // No error
|
|
$ += 1
|
|
print($)
|
|
}
|
|
func dollarLet() {
|
|
let $ = 42 // No error
|
|
print($)
|
|
}
|
|
func dollarClass() {
|
|
class $ {} // No error
|
|
}
|
|
func dollarEnum() {
|
|
enum $ {} // No error
|
|
}
|
|
func dollarStruct() {
|
|
struct $ {} // No error
|
|
}
|
|
|