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).
13 lines
249 B
Kotlin
Vendored
13 lines
249 B
Kotlin
Vendored
fun <T> run(block: () -> T) : T = block()
|
|
|
|
fun test1() {
|
|
run {
|
|
if (true) {
|
|
<!INVALID_IF_AS_EXPRESSION, IMPLICIT_CAST_TO_ANY!>if (true) {}<!>
|
|
}
|
|
else {
|
|
<!IMPLICIT_CAST_TO_ANY!>1<!>
|
|
}
|
|
}
|
|
}
|