Propagate inference session from local context into property resolvers
^KT-48633 Fixed
This commit is contained in:
+6
@@ -18483,6 +18483,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48445.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt48633.kt")
|
||||
public void testKt48633() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48633.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labaledCall.kt")
|
||||
public void testLabaledCall() throws Exception {
|
||||
|
||||
+2
-2
@@ -171,7 +171,7 @@ protected constructor(
|
||||
propertyDeclaration,
|
||||
trace,
|
||||
c.declarationScopeProvider.getOuterDataFlowInfoForDeclaration(propertyDeclaration),
|
||||
InferenceSession.default
|
||||
c.inferenceSession ?: InferenceSession.default
|
||||
)
|
||||
result.add(propertyDescriptor)
|
||||
}
|
||||
@@ -184,7 +184,7 @@ protected constructor(
|
||||
entry,
|
||||
trace,
|
||||
c.declarationScopeProvider.getOuterDataFlowInfoForDeclaration(entry),
|
||||
InferenceSession.default
|
||||
c.inferenceSession ?: InferenceSession.default
|
||||
)
|
||||
result.add(propertyDescriptor)
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ internal class TowerDataElementsForName3() {
|
||||
}
|
||||
}
|
||||
|
||||
// mute due to KT-48633
|
||||
//internal class TowerDataElementsForName4() {
|
||||
// @OptIn(ExperimentalStdlibApi::class)
|
||||
// val reversedFilteredLocalScopes = buildList l1@ {
|
||||
@@ -72,4 +71,4 @@ fun box(): String {
|
||||
val x3 = TowerDataElementsForName3().reversedFilteredLocalScopes
|
||||
// val x4 = TowerDataElementsForName4().reversedFilteredLocalScopes
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
class TowerDataElementsForName() {
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
val reversedFilteredLocalScopes = buildList {
|
||||
class Foo {
|
||||
val reversedFilteredLocalScopes = {
|
||||
add("OK")
|
||||
}
|
||||
}
|
||||
Foo().reversedFilteredLocalScopes()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return TowerDataElementsForName().reversedFilteredLocalScopes[0]
|
||||
}
|
||||
+6
@@ -18357,6 +18357,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48445.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt48633.kt")
|
||||
public void testKt48633() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48633.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labaledCall.kt")
|
||||
public void testLabaledCall() throws Exception {
|
||||
|
||||
+6
@@ -18483,6 +18483,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48445.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt48633.kt")
|
||||
public void testKt48633() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48633.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labaledCall.kt")
|
||||
public void testLabaledCall() throws Exception {
|
||||
|
||||
+5
@@ -15221,6 +15221,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48445.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt48633.kt")
|
||||
public void testKt48633() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48633.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("labaledCall.kt")
|
||||
public void testLabaledCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/labaledCall.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -13285,6 +13285,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48445.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt48633.kt")
|
||||
public void testKt48633() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48633.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("labaledCall.kt")
|
||||
public void testLabaledCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/labaledCall.kt");
|
||||
|
||||
Generated
+5
@@ -12691,6 +12691,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48445.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt48633.kt")
|
||||
public void testKt48633() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48633.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("labaledCall.kt")
|
||||
public void testLabaledCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/labaledCall.kt");
|
||||
|
||||
+5
@@ -14382,6 +14382,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt48633.kt")
|
||||
public void testKt48633() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48633.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("labaledCall.kt")
|
||||
public void testLabaledCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/labaledCall.kt");
|
||||
|
||||
Reference in New Issue
Block a user