Files
kotlin-fork/compiler/testData/codegen/box/javaInterop/generics/kt42824.kt
T
Pavel Kunyavskiy 733ca5a358 [K/N] Unmute tests already working on native
Also, add issue references for some tests
2023-06-06 14:29:21 +00:00

24 lines
516 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FILE: DiagnosticFactory0.java
import org.jetbrains.annotations.NotNull;
public class DiagnosticFactory0<E> {
@NotNull
public SimpleDiagnostic<E> on(@NotNull E element) {
return new SimpleDiagnostic<E>(element);
}
}
// FILE: test.kt
class SimpleDiagnostic<E>(val element: E)
interface KtAnnotationEntry
fun foo(error: DiagnosticFactory0<in KtAnnotationEntry>, entry: KtAnnotationEntry) {
error.on(entry) // used to be INAPPLICABLE_CANDIDATE
}
fun box() = "OK"