[FIR] Reproduce KT-64644
Ensure the given code crashes the compiler. ^KT-64644
This commit is contained in:
committed by
Space Team
parent
aaf34c3436
commit
7c3042772e
+6
@@ -213,6 +213,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt");
|
runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("compilerCrashInTypeParameterBoundsChecker.kt")
|
||||||
|
public void testCompilerCrashInTypeParameterBoundsChecker() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("compilerCrashParameterType.kt")
|
@TestMetadata("compilerCrashParameterType.kt")
|
||||||
public void testCompilerCrashParameterType() throws Exception {
|
public void testCompilerCrashParameterType() throws Exception {
|
||||||
|
|||||||
+6
@@ -213,6 +213,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt");
|
runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("compilerCrashInTypeParameterBoundsChecker.kt")
|
||||||
|
public void testCompilerCrashInTypeParameterBoundsChecker() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("compilerCrashParameterType.kt")
|
@TestMetadata("compilerCrashParameterType.kt")
|
||||||
public void testCompilerCrashParameterType() throws Exception {
|
public void testCompilerCrashParameterType() throws Exception {
|
||||||
|
|||||||
+6
@@ -213,6 +213,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt");
|
runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("compilerCrashInTypeParameterBoundsChecker.kt")
|
||||||
|
public void testCompilerCrashInTypeParameterBoundsChecker() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("compilerCrashParameterType.kt")
|
@TestMetadata("compilerCrashParameterType.kt")
|
||||||
public void testCompilerCrashParameterType() throws Exception {
|
public void testCompilerCrashParameterType() throws Exception {
|
||||||
|
|||||||
+6
@@ -213,6 +213,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt");
|
runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("compilerCrashInTypeParameterBoundsChecker.kt")
|
||||||
|
public void testCompilerCrashInTypeParameterBoundsChecker() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("compilerCrashParameterType.kt")
|
@TestMetadata("compilerCrashParameterType.kt")
|
||||||
public void testCompilerCrashParameterType() throws Exception {
|
public void testCompilerCrashParameterType() throws Exception {
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
// ISSUE: KT-64644
|
||||||
|
// WITH_STDLIB
|
||||||
|
|
||||||
|
typealias MaybePair = Pair<Int, Int>?
|
||||||
|
|
||||||
|
fun <T: <!FINAL_UPPER_BOUND!>MaybePair<!>> foo(x: T) {
|
||||||
|
if (x != null) {
|
||||||
|
println(x<!UNSAFE_CALL!>.<!>first)
|
||||||
|
println(x<!UNSAFE_CALL!>.<!>second)
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
// ISSUE: KT-64644
|
||||||
|
// WITH_STDLIB
|
||||||
|
|
||||||
|
typealias MaybePair = Pair<Int, Int>?
|
||||||
|
|
||||||
|
fun <T: MaybePair> foo(x: T) {
|
||||||
|
if (x != null) {
|
||||||
|
println(<!DEBUG_INFO_SMARTCAST!>x<!>.first)
|
||||||
|
println(<!DEBUG_INFO_SMARTCAST!>x<!>.second)
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+6
@@ -213,6 +213,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt");
|
runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("compilerCrashInTypeParameterBoundsChecker.kt")
|
||||||
|
public void testCompilerCrashInTypeParameterBoundsChecker() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("compilerCrashParameterType.kt")
|
@TestMetadata("compilerCrashParameterType.kt")
|
||||||
public void testCompilerCrashParameterType() throws Exception {
|
public void testCompilerCrashParameterType() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user