[LL FIR] add test for getOrBuildFir for super type
^KT-61789
This commit is contained in:
committed by
Space Team
parent
4d29d6e3b4
commit
515e05cd94
@@ -1,4 +1,4 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtTypeReference
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtTypeReference
|
||||
open class A
|
||||
|
||||
class B(): <expr>A</expr>()
|
||||
@@ -0,0 +1,4 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtTypeReference
|
||||
interface A
|
||||
|
||||
class B(): <expr>A</expr>
|
||||
@@ -0,0 +1,17 @@
|
||||
KT element: KtTypeReference
|
||||
FIR element: FirResolvedTypeRefImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
R|A|
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] superType2.kt
|
||||
public abstract [ResolvedTo(STATUS)] interface A : R|kotlin/Any| {
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] class B : R|A| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=B] constructor(): R|B| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtTypeReference
|
||||
interface A
|
||||
|
||||
class B(): <expr>A</expr> by f
|
||||
@@ -0,0 +1,19 @@
|
||||
KT element: KtTypeReference
|
||||
FIR element: FirResolvedTypeRefImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
R|A|
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] superType3.kt
|
||||
public abstract [ResolvedTo(STATUS)] interface A : R|kotlin/Any| {
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] [DelegateFieldsMapKey={0=FirFieldSymbol /B.$$delegate_0}] class B : R|A| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=B] constructor(): R|B| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|A| = <Unresolved name: f>#
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtTypeReference
|
||||
open class A
|
||||
|
||||
object B: <expr>A</expr>()
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
KT element: KtTypeReference
|
||||
FIR element: FirResolvedTypeRefImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
R|A|
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] superTypeInObject.kt
|
||||
public open [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] object B : R|A| {
|
||||
private [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=B] constructor(): R|B| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtTypeReference
|
||||
interface A
|
||||
|
||||
object B: <expr>A</expr>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
KT element: KtTypeReference
|
||||
FIR element: FirResolvedTypeRefImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
R|A|
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] superTypeInObject2.kt
|
||||
public abstract [ResolvedTo(STATUS)] interface A : R|kotlin/Any| {
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] object B : R|A| {
|
||||
private [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=B] constructor(): R|B| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtTypeReference
|
||||
interface A
|
||||
|
||||
object B: <expr>A</expr> by f
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
KT element: KtTypeReference
|
||||
FIR element: FirResolvedTypeRefImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
R|A|
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] superTypeInObject3.kt
|
||||
public abstract [ResolvedTo(STATUS)] interface A : R|kotlin/Any| {
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] [DelegateFieldsMapKey={0=FirFieldSymbol /B.$$delegate_0}] object B : R|A| {
|
||||
private [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=B] constructor(): R|B| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|A| = <Unresolved name: f>#
|
||||
|
||||
}
|
||||
+30
@@ -1111,12 +1111,42 @@ public class OutOfContentRootGetOrBuildFirTestGenerated extends AbstractOutOfCon
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superType2.kt")
|
||||
public void testSuperType2() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superType2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superType3.kt")
|
||||
public void testSuperType3() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superType3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeAndGeneratedProperty.kt")
|
||||
public void testSuperTypeAndGeneratedProperty() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeAndGeneratedProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeInObject.kt")
|
||||
public void testSuperTypeInObject() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeInObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeInObject2.kt")
|
||||
public void testSuperTypeInObject2() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeInObject2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeInObject3.kt")
|
||||
public void testSuperTypeInObject3() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeInObject3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeOnEnumClass.kt")
|
||||
public void testSuperTypeOnEnumClass() throws Exception {
|
||||
|
||||
+30
@@ -1111,12 +1111,42 @@ public class SourceGetOrBuildFirTestGenerated extends AbstractSourceGetOrBuildFi
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superType2.kt")
|
||||
public void testSuperType2() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superType2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superType3.kt")
|
||||
public void testSuperType3() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superType3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeAndGeneratedProperty.kt")
|
||||
public void testSuperTypeAndGeneratedProperty() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeAndGeneratedProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeInObject.kt")
|
||||
public void testSuperTypeInObject() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeInObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeInObject2.kt")
|
||||
public void testSuperTypeInObject2() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeInObject2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeInObject3.kt")
|
||||
public void testSuperTypeInObject3() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeInObject3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeOnEnumClass.kt")
|
||||
public void testSuperTypeOnEnumClass() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user