Files
swift-mirror/test/Compatibility/dollar_identifier.swift
David Farler b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00

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
}