Files
kotlin/compiler/testData/codegen/bytecodeText/notNullAssertions/javaMultipleSubstitutions.kt
Mikhail Zarechenskiy 5c5635ce20 Fix codegen & bytecode tests after unifying exceptions in JVM backend
See KT-22275 for details
2020-01-20 16:36:03 +03:00

39 lines
772 B
Kotlin
Vendored

// FILE: A.java
import org.jetbrains.annotations.NotNull;
class A<T, U> {
@NotNull
T foo() { return null; }
}
// FILE: B.java
import org.jetbrains.annotations.NotNull;
class B<T> extends A<T, Integer> {
@Override
@NotNull
T foo() { return null; }
}
// FILE: C.java
import org.jetbrains.annotations.NotNull;
class C extends B<String> {
@Override
@NotNull
String foo() { return null; }
}
// FILE: javaMultipleSubstitutions.kt
internal fun bar(a: A<String, Int>, b: B<String>, c: C) {
val sa: String = a.foo()
val sb: String = b.foo()
val sc: String = c.foo()
}
// @JavaMultipleSubstitutionsKt.class
// 0 checkExpressionValueIsNotNull
// 3 checkNotNullExpressionValue
// 0 checkParameterIsNotNull
// 3 checkNotNullParameter