FIR: Fix uninitialized lateinit FirSymbol::symbol for supertype of Java class
Earlier, isForSupertypes has been mapped to different boolean parameter
This commit is contained in:
+6
@@ -15881,6 +15881,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("supertypeUsesNested.kt")
|
||||
public void testSupertypeUsesNested() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/supertypeUsesNested.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("traitDefaultCall.kt")
|
||||
public void testTraitDefaultCall() throws Exception {
|
||||
|
||||
@@ -610,7 +610,7 @@ private fun JavaType?.toConeProjectionWithoutEnhancement(
|
||||
}
|
||||
}
|
||||
}
|
||||
is JavaClassifierType -> toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack, isForSupertypes)
|
||||
is JavaClassifierType -> toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack, isForSupertypes = isForSupertypes)
|
||||
is JavaArrayType -> toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack, isForSupertypes = isForSupertypes)
|
||||
else -> ConeClassErrorType(ConeSimpleDiagnostic("Unexpected type argument: $this", DiagnosticKind.Java))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// FIR_IDENTICAL
|
||||
// SKIP_TXT
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass extends ContainerType<Container<JavaClass.Nested>> {
|
||||
public static class Nested extends Container<String> {}
|
||||
}
|
||||
|
||||
// FILE: ContainerType.java
|
||||
public class ContainerType<T> {}
|
||||
|
||||
// FILE: Container.java
|
||||
public class Container<K> {}
|
||||
|
||||
// FILE: Usage.java
|
||||
public class Usage {
|
||||
public static JavaClass.Nested foo() { return null; }
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun main() {
|
||||
Usage.foo().hashCode()
|
||||
}
|
||||
Generated
+6
@@ -15887,6 +15887,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("supertypeUsesNested.kt")
|
||||
public void testSupertypeUsesNested() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/supertypeUsesNested.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("traitDefaultCall.kt")
|
||||
public void testTraitDefaultCall() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user