mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This consolidates the \x, \u, and \U escape sequences into one \u{abc} escape sequence.
For now we still parse and cleanly reject the old forms with a nice error message, this
will eventually be removed in a later beta (tracked by rdar://17527814)
Swift SVN r19435
17 lines
340 B
Swift
17 lines
340 B
Swift
// RUN: %target-run-simple-swift | FileCheck %s
|
|
|
|
// CHECK: 123ABCD
|
|
// CHECK: Hello ☃
|
|
// CHECK: Hello ☃
|
|
|
|
if (true) {
|
|
print(123)
|
|
print(UnicodeScalar(65))
|
|
print(UnicodeScalar(66))
|
|
print(UnicodeScalar(67))
|
|
print(UnicodeScalar(0o104))
|
|
print(UnicodeScalar(10))
|
|
print("Hello \u{2603}\n") // Hi Snowman!
|
|
print("Hello ☃\n")
|
|
}
|