KT-16618 IMPLICIT_INTEGER_COERCION isn't generated for global properties and default parameters

This commit is contained in:
Dmitry Petrov
2017-03-03 14:30:08 +03:00
parent ee6aae7219
commit 8e8f83656f
7 changed files with 124 additions and 8 deletions
@@ -1,3 +1,10 @@
val test1: Long = 42
val test2: Short = 42
val test3: Byte = 42
val test4: Long = 42.unaryMinus()
val test5: Short = 42.unaryMinus()
val test6: Byte = 42.unaryMinus()
fun test() {
val test1: Int? = 42
val test2: Long = 42
@@ -6,4 +13,8 @@ fun test() {
val test5: Long? = 1.unaryMinus()
val test6: Short? = 1.unaryMinus()
val test7: Byte? = 1.unaryMinus()
}
}
fun testImplicitArguments(x: Long = 1.unaryMinus()) {}
class TestImplicitArguments(val x: Long = 1.unaryMinus())