Last active
June 6, 2017 21:26
-
-
Save alessandro-martin/9fa91e3e7106cc30779a0df682287477 to your computer and use it in GitHub Desktop.
New in Xcode 9, has fixed this bug I filed last February
This file contains hidden or 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
// Up until Xcode 8.3.2 | |
// switching over a type's static properties required full namespace qualification | |
// This wouldn't compile | |
// Fixed in Xcode 9 :D | |
extension String { | |
static let firstSection: String = "firstSection" | |
static let secondSection: String = "secondSection" | |
} | |
let message: String = .firstSection | |
switch message { | |
case .firstSection: | |
print("First") | |
case .secondSection: | |
print("Second") | |
default: | |
print("Default") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment