Files
swift-mirror/test/Interpreter/simple.swift
Chris Lattner 287059b360 implement <rdar://problem/17279286> Swift has too many Unicode escape sequence forms
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
2014-07-01 23:27:44 +00:00

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")
}