Last active
August 29, 2015 14:16
-
-
Save krzyzanowskim/27560409d09880a86e05 to your computer and use it in GitHub Desktop.
Swift crash. Initializer on protocol.
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
// Version 6.3 (6D532l) | |
protocol Proto { | |
init() | |
} | |
struct S1: Proto { | |
init() {} | |
} | |
func create() -> Proto.Type { | |
return S1.self | |
} | |
let crash = create() | |
crash() // crash! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment