[LL FIR] fix lazy resolution of member-property statuses for local classes
Previously, statuses of superclass which are not local was not ignored Sometimes it worked in the IDE by calling lazyResolveToPhase which is a violation of the lazy resolution contract ^KT-54890
This commit is contained in:
+5
@@ -2783,6 +2783,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/localClasses/implicitInLocalClasses.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("overrideInLocal.kt")
|
||||
public void testOverrideInLocal() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/localClasses/overrideInLocal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typesFromSuperClasses.kt")
|
||||
public void testTypesFromSuperClasses() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/localClasses/typesFromSuperClasses.kt");
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
FILE: a.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
local final class Local : R|B| {
|
||||
public constructor(): R|Local| {
|
||||
super<R|B|>()
|
||||
}
|
||||
|
||||
protected final override val message: R|kotlin/String| = String(expression expected)
|
||||
protected get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
FILE: b.kt
|
||||
public abstract class B : R|kotlin/Any| {
|
||||
public constructor(): R|B| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
protected abstract val message: R|kotlin/String|
|
||||
protected get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// FILE: a.kt
|
||||
fun main() {
|
||||
class Local : B() {
|
||||
override val message = "expression expected"
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
abstract class B {
|
||||
protected abstract val message: String
|
||||
}
|
||||
+6
@@ -3163,6 +3163,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/localClasses/implicitInLocalClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideInLocal.kt")
|
||||
public void testOverrideInLocal() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/localClasses/overrideInLocal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typesFromSuperClasses.kt")
|
||||
public void testTypesFromSuperClasses() throws Exception {
|
||||
|
||||
+6
@@ -3163,6 +3163,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/localClasses/implicitInLocalClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideInLocal.kt")
|
||||
public void testOverrideInLocal() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/localClasses/overrideInLocal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typesFromSuperClasses.kt")
|
||||
public void testTypesFromSuperClasses() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user