Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/nullability/kt25182.kt
T
Mikhail Zarechenskiy 7b108541a9 [NI] Add test for obsolete issue
It was fixed after c6712ff861

 #KT-25182 Obsolete
2018-11-23 17:30:37 +03:00

14 lines
309 B
Kotlin
Vendored

// !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)))
}