0xFF0000FF An integer literal does not conform to

2019-02-21 10:34发布

问题:

Why doesn't this work:

var color: Int = 0xFF0000FF

and why do I have to call toInt()

var color: Int = 0xFF0000FF.toInt()

回答1:

This is a bug in the compiler, feel free to vote / watch it: https://youtrack.jetbrains.com/issue/KT-2780



标签: kotlin