Created
April 11, 2018 06:18
-
-
Save creaaa/166097d0db2093e143eb58843296ed87 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
// let box = Box(42) | |
// box as! Box<Bool> // 実行時死ぬ | |
Box(42) as! Box<Bool> // コンパイルエラー | |
なぜ!!!!!!!!!!!!!!!!!!!!!?????????????????????????????? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1行で書いたときだけ、コンパイラは感知する(むしろ"感知できる")、って感じなんだな。たぶん。
まぁそれならわかるか...。
てか、as! がコンパイルエラーになるパターンもあったんか。