FIR: implement FE1.0-matching ILT approximation during inference

#KT-51357 Fixed
This commit is contained in:
Mikhail Glukhikh
2022-02-16 15:24:23 +03:00
committed by Space
parent 6506d35aa6
commit 6e53dd1a4b
8 changed files with 22 additions and 19 deletions
@@ -1,12 +0,0 @@
class Expression<T>(val x: T)
class GreaterOp(val expr1: Expression<*>, val expr2: Expression<*>)
fun <T : Comparable<T>, S : T?> Expression<in S>.greater(other: T): GreaterOp =
GreaterOp(this, Expression(other))
fun foo(countExpr: Expression<Long>) {
<!NEW_INFERENCE_ERROR!>countExpr.greater(0)<!>
countExpr.greater("0")
countExpr.greater<String, Nothing>("0")
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class Expression<T>(val x: T)
class GreaterOp(val expr1: Expression<*>, val expr2: Expression<*>)