[FIR] Ensure KT-64089 works
Make sure SENSELESS_COMPARISON is absent in this case. ^KT-64089 Obsolete Merge-request: KT-MR-13754 Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
b6d373d8e5
commit
aea2e8052a
+6
@@ -591,6 +591,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("k2IrParentIssue.kt")
|
||||||
|
public void testK2IrParentIssue() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/k2IrParentIssue.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt11167.kt")
|
@TestMetadata("kt11167.kt")
|
||||||
public void testKt11167() throws Exception {
|
public void testKt11167() throws Exception {
|
||||||
|
|||||||
+6
@@ -591,6 +591,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("k2IrParentIssue.kt")
|
||||||
|
public void testK2IrParentIssue() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/k2IrParentIssue.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt11167.kt")
|
@TestMetadata("kt11167.kt")
|
||||||
public void testKt11167() throws Exception {
|
public void testKt11167() throws Exception {
|
||||||
|
|||||||
+6
@@ -591,6 +591,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("k2IrParentIssue.kt")
|
||||||
|
public void testK2IrParentIssue() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/k2IrParentIssue.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt11167.kt")
|
@TestMetadata("kt11167.kt")
|
||||||
public void testKt11167() throws Exception {
|
public void testKt11167() throws Exception {
|
||||||
|
|||||||
+6
@@ -591,6 +591,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("k2IrParentIssue.kt")
|
||||||
|
public void testK2IrParentIssue() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/k2IrParentIssue.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt11167.kt")
|
@TestMetadata("kt11167.kt")
|
||||||
public void testKt11167() throws Exception {
|
public void testKt11167() throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// ISSUE: KT-64089
|
||||||
|
|
||||||
|
fun <T> contentReturner(f: () -> T): T {
|
||||||
|
return null <!UNCHECKED_CAST!>as T<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
fun main(number: Int? = null) {
|
||||||
|
contentReturner {
|
||||||
|
"".apply {
|
||||||
|
number!!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
number != null
|
||||||
|
}
|
||||||
Generated
+6
@@ -591,6 +591,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("k2IrParentIssue.kt")
|
||||||
|
public void testK2IrParentIssue() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/k2IrParentIssue.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt11167.kt")
|
@TestMetadata("kt11167.kt")
|
||||||
public void testKt11167() throws Exception {
|
public void testKt11167() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user