609ffc10a9
- update diagnostic to (supposedly) more useful - also report IMPLICIT_CAST_TO_ANY if expected type is DONT_CARE (effectively "no expected type" for lambda expression).
8 lines
292 B
Kotlin
Vendored
8 lines
292 B
Kotlin
Vendored
val test1 = { if (true) <!IMPLICIT_CAST_TO_ANY!>1<!> else <!IMPLICIT_CAST_TO_ANY!>""<!> }
|
|
|
|
val test2 = { { if (true) <!IMPLICIT_CAST_TO_ANY!>1<!> else <!IMPLICIT_CAST_TO_ANY!>""<!> } }
|
|
|
|
val test3: (Boolean) -> Any = { if (it) 1 else "" }
|
|
|
|
val test4: (Boolean) -> Any? = { if (it) 1 else "" }
|