FIR: add test for KT-51357

This commit is contained in:
Mikhail Glukhikh
2022-02-16 14:30:58 +03:00
committed by Space
parent acc467594f
commit 4902e517d3
7 changed files with 69 additions and 0 deletions
@@ -0,0 +1,12 @@
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>) {
countExpr.greater(0)
countExpr.greater("0")
countExpr.greater<String, Nothing>("0")
}