[FIR] Add a minimized alternative for orOperatorWithConstant.kt
It was decided to leave this code as is, because supporting it would probably require introducing Implication-statements, but this is not a good-enough use-case for such work.
This commit is contained in:
committed by
Space Team
parent
f52648af5f
commit
dd85a81d45
+6
@@ -35020,6 +35020,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smartCastWithOrFalse.kt")
|
||||
public void testSmartCastWithOrFalse() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smartcastInFriendModule.kt")
|
||||
public void testSmartcastInFriendModule() throws Exception {
|
||||
|
||||
+6
@@ -35020,6 +35020,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smartCastWithOrFalse.kt")
|
||||
public void testSmartCastWithOrFalse() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smartcastInFriendModule.kt")
|
||||
public void testSmartcastInFriendModule() throws Exception {
|
||||
|
||||
+6
@@ -32740,6 +32740,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smartCastWithOrFalse.kt")
|
||||
public void testSmartCastWithOrFalse() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smartcastInFriendModule.kt")
|
||||
public void testSmartcastInFriendModule() throws Exception {
|
||||
|
||||
+6
@@ -32860,6 +32860,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smartCastWithOrFalse.kt")
|
||||
public void testSmartCastWithOrFalse() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smartcastInFriendModule.kt")
|
||||
public void testSmartcastInFriendModule() throws Exception {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fun main(x: Any?) {
|
||||
if (x is String || false) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fun main(x: Any?) {
|
||||
if (x is String || false) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
}
|
||||
Generated
+6
@@ -35020,6 +35020,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smartCastWithOrFalse.kt")
|
||||
public void testSmartCastWithOrFalse() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smartcastInFriendModule.kt")
|
||||
public void testSmartcastInFriendModule() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user