Files
kotlin-fork/compiler/testData/diagnostics/tests/inner/accessingToJavaNestedClass.fir.kt
T
Mikhail Glukhikh 0804c6a0f3 [FIR] Introduce TYPE_ARGUMENTS_NOT_ALLOWED & some other type errors
This commit introduces several different things, in particular:
- check type arguments in expressions
- new TypeArgumentList node to deal with diagnostic source
- ConeDiagnostic was moved to fir:cones
- ConeIntermediateDiagnostic to use in inference (?) without reporting
- detailed diagnostics on error type
2020-08-02 18:19:44 +03:00

65 lines
1.1 KiB
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_VARIABLE
// FILE: A.java
public class A {
static class NC {}
class IC {}
static interface NI {}
}
// FILE: I.java
public interface I {
class NC {}
interface NI {}
}
// FILE: B.java
public class B extends A {
}
// FILE: C.java
public class C implements I {
}
// FILE: D.java
public class D extends A implements I {
}
// FILE: K.kt
class K : D()
// FILE: test.kt
fun test() {
val ac: A.NC = A.NC()
val aic: A.IC = A().IC()
val ai: A.NI? = null
val ic: I.NC = I.NC()
val ii: I.NI? = null
val bc: <!OTHER_ERROR!>B.NC<!> = B.<!UNRESOLVED_REFERENCE!>NC<!>()
val bic: <!OTHER_ERROR!>B.IC<!> = B().IC()
val bi: <!OTHER_ERROR!>B.NI?<!> = null
val cc: <!OTHER_ERROR!>C.NC<!> = C.<!UNRESOLVED_REFERENCE!>NC<!>()
val ci: <!OTHER_ERROR!>C.NI?<!> = null
val dc: <!OTHER_ERROR!>D.NC<!> = D.<!UNRESOLVED_REFERENCE!>NC<!>()
val dic: <!OTHER_ERROR!>D.IC<!> = D().IC()
val di: <!OTHER_ERROR!>D.NI?<!> = null
val kc: <!OTHER_ERROR!>K.NC<!> = K.<!UNRESOLVED_REFERENCE!>NC<!>()
val kic: <!OTHER_ERROR!>K.IC<!> = K().IC()
val ki: <!OTHER_ERROR!>K.NI?<!> = null
}