[NI] Fix replacing original in PropertyDescriptor
This commit is contained in:
+1
-1
@@ -845,7 +845,7 @@ private fun PropertyDescriptorImpl.hackSettersAccordingToCapturedOutTypes(): Pro
|
|||||||
TypeApproximatorConfiguration.CapturedAndIntegerLiteralsTypesApproximation
|
TypeApproximatorConfiguration.CapturedAndIntegerLiteralsTypesApproximation
|
||||||
) ?: return this
|
) ?: return this
|
||||||
|
|
||||||
val newProperty = newCopyBuilder().build() as PropertyDescriptorImpl
|
val newProperty = newCopyBuilder().setOriginal(original).build() as PropertyDescriptorImpl
|
||||||
|
|
||||||
val newSetter = with(setter) {
|
val newSetter = with(setter) {
|
||||||
PropertySetterDescriptorImpl(newProperty, annotations, modality, visibility, isDefault, isExternal, isInline, kind, original, source)
|
PropertySetterDescriptorImpl(newProperty, annotations, modality, visibility, isDefault, isExternal, isInline, kind, original, source)
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// IGNORE_BACKEND: JS_IR
|
||||||
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
interface A<T> {
|
||||||
|
var x: T
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(a: A<*>) {
|
||||||
|
a.x
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+5
@@ -12030,6 +12030,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("capturedStarProjection.kt")
|
||||||
|
public void testCapturedStarProjection() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inference/capturedStarProjection.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("integerLiteralTypeInLamdaReturnType.kt")
|
@TestMetadata("integerLiteralTypeInLamdaReturnType.kt")
|
||||||
public void testIntegerLiteralTypeInLamdaReturnType() throws Exception {
|
public void testIntegerLiteralTypeInLamdaReturnType() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inference/integerLiteralTypeInLamdaReturnType.kt");
|
runTest("compiler/testData/codegen/box/inference/integerLiteralTypeInLamdaReturnType.kt");
|
||||||
|
|||||||
+5
@@ -12030,6 +12030,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("capturedStarProjection.kt")
|
||||||
|
public void testCapturedStarProjection() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inference/capturedStarProjection.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("integerLiteralTypeInLamdaReturnType.kt")
|
@TestMetadata("integerLiteralTypeInLamdaReturnType.kt")
|
||||||
public void testIntegerLiteralTypeInLamdaReturnType() throws Exception {
|
public void testIntegerLiteralTypeInLamdaReturnType() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inference/integerLiteralTypeInLamdaReturnType.kt");
|
runTest("compiler/testData/codegen/box/inference/integerLiteralTypeInLamdaReturnType.kt");
|
||||||
|
|||||||
+5
@@ -12035,6 +12035,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("capturedStarProjection.kt")
|
||||||
|
public void testCapturedStarProjection() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inference/capturedStarProjection.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("integerLiteralTypeInLamdaReturnType.kt")
|
@TestMetadata("integerLiteralTypeInLamdaReturnType.kt")
|
||||||
public void testIntegerLiteralTypeInLamdaReturnType() throws Exception {
|
public void testIntegerLiteralTypeInLamdaReturnType() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inference/integerLiteralTypeInLamdaReturnType.kt");
|
runTest("compiler/testData/codegen/box/inference/integerLiteralTypeInLamdaReturnType.kt");
|
||||||
|
|||||||
Generated
+5
@@ -9460,6 +9460,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("capturedStarProjection.kt")
|
||||||
|
public void testCapturedStarProjection() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inference/capturedStarProjection.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("integerLiteralTypeInLamdaReturnType.kt")
|
@TestMetadata("integerLiteralTypeInLamdaReturnType.kt")
|
||||||
public void testIntegerLiteralTypeInLamdaReturnType() throws Exception {
|
public void testIntegerLiteralTypeInLamdaReturnType() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inference/integerLiteralTypeInLamdaReturnType.kt");
|
runTest("compiler/testData/codegen/box/inference/integerLiteralTypeInLamdaReturnType.kt");
|
||||||
|
|||||||
+5
@@ -10615,6 +10615,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("capturedStarProjection.kt")
|
||||||
|
public void testCapturedStarProjection() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inference/capturedStarProjection.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("integerLiteralTypeInLamdaReturnType.kt")
|
@TestMetadata("integerLiteralTypeInLamdaReturnType.kt")
|
||||||
public void testIntegerLiteralTypeInLamdaReturnType() throws Exception {
|
public void testIntegerLiteralTypeInLamdaReturnType() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inference/integerLiteralTypeInLamdaReturnType.kt");
|
runTest("compiler/testData/codegen/box/inference/integerLiteralTypeInLamdaReturnType.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user