Last active
June 18, 2017 09:12
-
-
Save ezura/eef428f3c572958c2e0e9bfca9ce4e87 to your computer and use it in GitHub Desktop.
整数リテラルは Int になる。*literalConvertible 的なものはない?暗黙的型変換がないとのこと。型変換するときはメソッドを使う。Swift と違い、変換元の方が変換の責任を持っているように見える。
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
| val i: Double = 1 // 型 error | |
| val i_: Double = 1.toDouble() |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
数値系だと、この記事も合わせて見ておきたい
http://qiita.com/d_date/items/b3562f542afc306791ce