Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/nullability/kt25182.kt
T

15 lines
326 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
abstract class Expr<T>
class Sum<K>(val e: Expr<K>) : Expr<K?>()
private fun <V> times(e: Expr<V>, element: V): Expr<V> = TODO()
private fun <S> foo(e: Expr<S>) {}
fun test(intExpression: Expr<Int>) {
foo(Sum(times(intExpression, 42)))
}