be232d3e6f
#KT-56377
15 lines
500 B
Kotlin
Vendored
15 lines
500 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// !LANGUAGE: -ForbidInferringTypeVariablesIntoEmptyIntersection
|
|
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.<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>greater<!>("0")
|
|
countExpr.greater<String, Nothing>("0")
|
|
}
|