FIR: don't enhance synthetic property if not needed
This commit is contained in:
committed by
teamcity
parent
6b1da9eb70
commit
a05244eca1
+6
@@ -16342,6 +16342,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
|
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("CustomThrowableMessage.kt")
|
||||||
|
public void testCustomThrowableMessage() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/fir/CustomThrowableMessage.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ExtensionAlias.kt")
|
@TestMetadata("ExtensionAlias.kt")
|
||||||
public void testExtensionAlias() throws Exception {
|
public void testExtensionAlias() throws Exception {
|
||||||
|
|||||||
+1
@@ -152,6 +152,7 @@ class FirSignatureEnhancement(
|
|||||||
} else {
|
} else {
|
||||||
setterDelegate?.symbol
|
setterDelegate?.symbol
|
||||||
}
|
}
|
||||||
|
if (getterDelegate !is FirJavaMethod && setterDelegate !is FirJavaMethod) return original
|
||||||
return buildSyntheticProperty {
|
return buildSyntheticProperty {
|
||||||
moduleData = this@FirSignatureEnhancement.moduleData
|
moduleData = this@FirSignatureEnhancement.moduleData
|
||||||
this.name = name
|
this.name = name
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
// TARGET_BACKEND: JVM_IR
|
||||||
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
// MODULE: m1
|
||||||
|
// FILE: m1/ConfigurationException.java
|
||||||
|
|
||||||
|
package m1;
|
||||||
|
|
||||||
|
public class ConfigurationException extends Exception {
|
||||||
|
public ConfigurationException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return super.getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: m2(m1)
|
||||||
|
// FILE: m2/RuntimeConfigurationException.java
|
||||||
|
|
||||||
|
package m2;
|
||||||
|
import m1.ConfigurationException;
|
||||||
|
|
||||||
|
public class RuntimeConfigurationException extends ConfigurationException {
|
||||||
|
public RuntimeConfigurationException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: m2/RuntimeConfigurationError.java
|
||||||
|
|
||||||
|
package m2;
|
||||||
|
|
||||||
|
public class RuntimeConfigurationError extends RuntimeConfigurationException{
|
||||||
|
public RuntimeConfigurationError(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: m3(m2, m1)
|
||||||
|
// FILE: m3.kt
|
||||||
|
|
||||||
|
package m3
|
||||||
|
import m2.RuntimeConfigurationError
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
try {
|
||||||
|
throw RuntimeConfigurationError("OK")
|
||||||
|
} catch (e: RuntimeConfigurationError) {
|
||||||
|
return e.message!!
|
||||||
|
}
|
||||||
|
}
|
||||||
+6
@@ -16342,6 +16342,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
|
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("CustomThrowableMessage.kt")
|
||||||
|
public void testCustomThrowableMessage() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/fir/CustomThrowableMessage.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ExtensionAlias.kt")
|
@TestMetadata("ExtensionAlias.kt")
|
||||||
public void testExtensionAlias() throws Exception {
|
public void testExtensionAlias() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user