[FakeOverrideBuilder] Workaround KT-64743
Because of KT-64743 there is unexpanded type-alias in a place we don't expect it to occur. To workaround this, we just expand typialiases in one more place. ^KT-64743
This commit is contained in:
committed by
Space Team
parent
c0f0c595c3
commit
c6e32571d6
+6
@@ -35278,6 +35278,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("aliasSuperTypeInLazy.kt")
|
||||
public void testAliasSuperTypeInLazy() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/aliasSuperTypeInLazy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
|
||||
+6
@@ -35278,6 +35278,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("aliasSuperTypeInLazy.kt")
|
||||
public void testAliasSuperTypeInLazy() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/aliasSuperTypeInLazy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
|
||||
+3
-5
@@ -9,10 +9,7 @@ import org.jetbrains.kotlin.fir.*
|
||||
import org.jetbrains.kotlin.fir.backend.*
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.*
|
||||
import org.jetbrains.kotlin.fir.resolve.defaultType
|
||||
import org.jetbrains.kotlin.fir.resolve.isRealOwnerOf
|
||||
import org.jetbrains.kotlin.fir.resolve.toFirRegularClass
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
import org.jetbrains.kotlin.fir.resolve.*
|
||||
import org.jetbrains.kotlin.fir.scopes.*
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.FirFakeOverrideGenerator
|
||||
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
|
||||
@@ -251,7 +248,8 @@ class FakeOverrideGenerator(
|
||||
if (!compatibleType) {
|
||||
return@mapNotNull null
|
||||
}
|
||||
symbol to superType.lookupTag
|
||||
// TODO: it should be already expanded - KT-64743
|
||||
symbol to superType.fullyExpandedType(session).lookupTag
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -34869,6 +34869,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("aliasSuperTypeInLazy.kt")
|
||||
public void testAliasSuperTypeInLazy() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/aliasSuperTypeInLazy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
|
||||
+6
@@ -34869,6 +34869,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("aliasSuperTypeInLazy.kt")
|
||||
public void testAliasSuperTypeInLazy() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/aliasSuperTypeInLazy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
|
||||
+6
@@ -34869,6 +34869,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("aliasSuperTypeInLazy.kt")
|
||||
public void testAliasSuperTypeInLazy() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/aliasSuperTypeInLazy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// LANGUAGE: +MultiPlatformProjects
|
||||
// KT-64776 - test infra problems
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, WASM
|
||||
// MODULE: dep
|
||||
// FILE: dep.kt
|
||||
|
||||
open class Base1() {
|
||||
val prop = "O"
|
||||
fun foo() = "K"
|
||||
}
|
||||
open class Base2 : Base1()
|
||||
|
||||
// MODULE: lib-common(dep)
|
||||
// FILE: lib-common.kt
|
||||
|
||||
|
||||
open expect class BaseAlias() : Base1
|
||||
|
||||
open class Child: BaseAlias()
|
||||
|
||||
// MODULE: lib-jvm(dep)()(lib-common)
|
||||
// FILE: lib-jvm.kt
|
||||
|
||||
actual typealias BaseAlias = Base2
|
||||
|
||||
// MODULE: main(lib-jvm, dep)
|
||||
// FILE: main.kt
|
||||
|
||||
class InMain : Child()
|
||||
|
||||
fun box() : String {
|
||||
return InMain().prop + InMain().foo()
|
||||
}
|
||||
+6
@@ -24447,6 +24447,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("aliasSuperTypeInLazy.kt")
|
||||
public void testAliasSuperTypeInLazy() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/aliasSuperTypeInLazy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
|
||||
Generated
+6
@@ -24447,6 +24447,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("aliasSuperTypeInLazy.kt")
|
||||
public void testAliasSuperTypeInLazy() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/aliasSuperTypeInLazy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
|
||||
+6
@@ -27806,6 +27806,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("aliasSuperTypeInLazy.kt")
|
||||
public void testAliasSuperTypeInLazy() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/aliasSuperTypeInLazy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
|
||||
+6
@@ -28438,6 +28438,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("aliasSuperTypeInLazy.kt")
|
||||
public void testAliasSuperTypeInLazy() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/aliasSuperTypeInLazy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
|
||||
Generated
+6
@@ -24417,6 +24417,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("aliasSuperTypeInLazy.kt")
|
||||
public void testAliasSuperTypeInLazy() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/aliasSuperTypeInLazy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
|
||||
Reference in New Issue
Block a user