Last active
August 29, 2015 14:15
-
-
Save gfx/6f93d4ebe0e53dcbb9b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $ xcrun swiftc --version | |
// Apple Swift version 1.2 (swiftlang-602.0.42.4 clang-602.0.42) | |
// Target: x86_64-apple-darwin14.1.0 | |
var s = "" | |
s.append("\u{1f363}" as UnicodeScalar) | |
assert(s == "\u{1f363}") // pass | |
s = "" | |
Character("\u{1f363}").writeTo(&s) | |
assert(s == "\u{1f363}") // pass | |
s = "" | |
s.append("\u{1f363}" as Character) | |
assert(s == "\u{1f363}") // error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment