Add possibility to interpret and fold IrStringConcatenation expression

This commit is contained in:
Ivan Kylchik
2023-02-09 12:29:27 +01:00
committed by Space Team
parent 7cf9dda8dc
commit 63b340651d
77 changed files with 305 additions and 184 deletions
@@ -21229,6 +21229,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/modifiers/const/stdlibConstFun.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/const/stringConcatenation.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
@@ -21235,6 +21235,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/modifiers/const/stdlibConstFun.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/const/stringConcatenation.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
@@ -79,7 +79,7 @@ internal fun checkConstantArguments(
if (exp is FirResolvedQualifier) {
return ConstantArgumentKind.NOT_CONST
}
checkConstantArguments(exp, session).let { return it }
checkConstantArguments(exp, session)?.let { return it }
}
}
expression is FirGetClassCall -> {
@@ -28388,6 +28388,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
@@ -28388,6 +28388,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {