FIR: Use Any? expect type to the argument list of ==
^KT-47409 Related
This commit is contained in:
committed by
TeamCityServer
parent
4892ad42b9
commit
c8c558b575
@@ -0,0 +1,18 @@
|
||||
FILE: equals.kt
|
||||
public final fun <T> materialize(): R|T| {
|
||||
^materialize R|kotlin/TODO|()
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
when () {
|
||||
==(String(), R|/materialize|<R|kotlin/Any?|>()) -> {
|
||||
^main Unit
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
==(R|/materialize|<R|kotlin/Any?|>(), String()) -> {
|
||||
^main Unit
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fun <T> materialize(): T = TODO()
|
||||
|
||||
fun main() {
|
||||
if ("" == materialize()) return // FE1.0: OK, type argument inferred to Any?
|
||||
if (materialize() == "") return // FE1.0: Error, uninferred type argument for `T`
|
||||
}
|
||||
Reference in New Issue
Block a user