[Analysis API] add diagnostic tests for unresolved reference inside primary constructor
^KT-62437
This commit is contained in:
committed by
Space Team
parent
45a59f0a55
commit
1a01dd4dd4
+36
@@ -70,6 +70,42 @@ public class Fe10IdeNormalAnalysisSourceModuleCollectDiagnosticsTestGenerated ex
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolved.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedAnnotationsOnPropertyFromParameter.kt")
|
||||
public void testUnresolvedAnnotationsOnPropertyFromParameter() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedAnnotationsOnPropertyFromParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCall.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCall() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCallWithLocalFunction.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCallWithLocalFunction() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCallWithLocalFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCallWithPrimaryConstructor.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCallWithPrimaryConstructor() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCallWithPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCallWithSecondaryConstructor.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCallWithSecondaryConstructor() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCallWithSecondaryConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperPrimaryConstructorCallWithLocalFunction.kt")
|
||||
public void testUnresolvedReferenceInsideSuperPrimaryConstructorCallWithLocalFunction() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperPrimaryConstructorCallWithLocalFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedSuperConstructorCall.kt")
|
||||
public void testUnresolvedSuperConstructorCall() throws Exception {
|
||||
|
||||
+36
@@ -70,6 +70,42 @@ public class FirIdeNormalAnalysisSourceModuleCollectDiagnosticsTestGenerated ext
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolved.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedAnnotationsOnPropertyFromParameter.kt")
|
||||
public void testUnresolvedAnnotationsOnPropertyFromParameter() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedAnnotationsOnPropertyFromParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCall.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCall() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCallWithLocalFunction.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCallWithLocalFunction() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCallWithLocalFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCallWithPrimaryConstructor.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCallWithPrimaryConstructor() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCallWithPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCallWithSecondaryConstructor.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCallWithSecondaryConstructor() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCallWithSecondaryConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperPrimaryConstructorCallWithLocalFunction.kt")
|
||||
public void testUnresolvedReferenceInsideSuperPrimaryConstructorCallWithLocalFunction() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperPrimaryConstructorCallWithLocalFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedSuperConstructorCall.kt")
|
||||
public void testUnresolvedSuperConstructorCall() throws Exception {
|
||||
|
||||
+36
@@ -70,6 +70,42 @@ public class FirStandaloneNormalAnalysisSourceModuleCollectDiagnosticsTestGenera
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolved.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedAnnotationsOnPropertyFromParameter.kt")
|
||||
public void testUnresolvedAnnotationsOnPropertyFromParameter() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedAnnotationsOnPropertyFromParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCall.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCall() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCallWithLocalFunction.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCallWithLocalFunction() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCallWithLocalFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCallWithPrimaryConstructor.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCallWithPrimaryConstructor() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCallWithPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperConstructorCallWithSecondaryConstructor.kt")
|
||||
public void testUnresolvedReferenceInsideSuperConstructorCallWithSecondaryConstructor() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperConstructorCallWithSecondaryConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReferenceInsideSuperPrimaryConstructorCallWithLocalFunction.kt")
|
||||
public void testUnresolvedReferenceInsideSuperPrimaryConstructorCallWithLocalFunction() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolvedReferenceInsideSuperPrimaryConstructorCallWithLocalFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedSuperConstructorCall.kt")
|
||||
public void testUnresolvedSuperConstructorCall() throws Exception {
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
Diagnostics from elements:
|
||||
for PSI element of type KtNameReferenceExpression at (2,15-27)
|
||||
UNRESOLVED_REFERENCE text ranges: [(23,35)]
|
||||
PSI: KtNameReferenceExpression at (2,15-27)
|
||||
for PSI element of type KtNameReferenceExpression at (3,10-20)
|
||||
UNRESOLVED_REFERENCE text ranges: [(45,55)]
|
||||
PSI: KtNameReferenceExpression at (3,10-20)
|
||||
for PSI element of type KtNameReferenceExpression at (4,10-20)
|
||||
UNRESOLVED_REFERENCE text ranges: [(65,75)]
|
||||
PSI: KtNameReferenceExpression at (4,10-20)
|
||||
for PSI element of type KtNameReferenceExpression at (5,15-30)
|
||||
UNRESOLVED_REFERENCE text ranges: [(90,105)]
|
||||
PSI: KtNameReferenceExpression at (5,15-30)
|
||||
for PSI element of type KtNameReferenceExpression at (6,12-21)
|
||||
UNRESOLVED_REFERENCE text ranges: [(117,126)]
|
||||
PSI: KtNameReferenceExpression at (6,12-21)
|
||||
for PSI element of type KtNameReferenceExpression at (7,12-21)
|
||||
UNRESOLVED_REFERENCE text ranges: [(138,147)]
|
||||
PSI: KtNameReferenceExpression at (7,12-21)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class A(
|
||||
@property:PropertyAnno
|
||||
@get:GetterAnno
|
||||
@set:SetterAnno
|
||||
@setparam:SetterParamAnno
|
||||
@field:FieldAnno
|
||||
@param:ParamAnno
|
||||
var prop: Int,
|
||||
)
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
Diagnostics from elements:
|
||||
for PSI element of type KtNameReferenceExpression at (7,12-21)
|
||||
UNRESOLVED_REFERENCE text ranges: [(138,147)]
|
||||
PSI: KtNameReferenceExpression at (7,12-21)
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
Diagnostics from elements:
|
||||
for PSI element of type KtNameReferenceExpression at (4,5-15)
|
||||
UNRESOLVED_REFERENCE text ranges: [(90,100)]
|
||||
PSI: KtNameReferenceExpression at (4,5-15)
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
open class IJProject(val init: () -> Unit = {})
|
||||
|
||||
class KotlinIDE : IJProject(init = {
|
||||
anySymbols
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
Diagnostics from elements:
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
Diagnostics from elements:
|
||||
for PSI element of type KtNameReferenceExpression at (6,17-27)
|
||||
UNRESOLVED_REFERENCE text ranges: [(147,157)]
|
||||
PSI: KtNameReferenceExpression at (6,17-27)
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
open class IJProject(val init: () -> Unit = {})
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
class KotlinIDE : IJProject(init = {
|
||||
fun foo() {
|
||||
val f = anySymbols
|
||||
}
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
Diagnostics from elements:
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
open class IJProject(val init: () -> Unit = {})
|
||||
|
||||
class KotlinIDE() : IJProject(init = {
|
||||
anySymbols
|
||||
})
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
Diagnostics from elements:
|
||||
for PSI element of type KtNameReferenceExpression at (4,5-15)
|
||||
UNRESOLVED_REFERENCE text ranges: [(92,102)]
|
||||
PSI: KtNameReferenceExpression at (4,5-15)
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
open class IJProject(val init: () -> Unit = {})
|
||||
|
||||
class KotlinIDE : IJProject {
|
||||
constructor() : super(init = {
|
||||
anySymbols
|
||||
})
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
Diagnostics from elements:
|
||||
for PSI element of type KtNameReferenceExpression at (5,9-19)
|
||||
UNRESOLVED_REFERENCE text ranges: [(122,132)]
|
||||
PSI: KtNameReferenceExpression at (5,9-19)
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
open class IJProject(val init: () -> Unit = {})
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
class KotlinIDE() : IJProject(init = {
|
||||
fun foo() {
|
||||
val f = anySymbols
|
||||
}
|
||||
})
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
Diagnostics from elements:
|
||||
for PSI element of type KtNameReferenceExpression at (6,17-27)
|
||||
UNRESOLVED_REFERENCE text ranges: [(149,159)]
|
||||
PSI: KtNameReferenceExpression at (6,17-27)
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
|
||||
<expr>@Anno</expr>
|
||||
enum class MyClass(val i: Int = foo()) {
|
||||
ENTRY1,
|
||||
ENTRY2(42);
|
||||
|
||||
fun boo(a: String) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() = 42
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@<ERROR TYPE REF: Symbol not found for Anno>[Types]()
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] annotationOnEnumClass.kt
|
||||
@<ERROR TYPE REF: Symbol not found for Anno>[Types]() public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] enum class MyClass : R|kotlin/Enum<MyClass>| {
|
||||
private [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/MyClass.i] i: Int = LAZY_EXPRESSION): R|MyClass| {
|
||||
LAZY_super<R|kotlin/Enum<MyClass>|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val i: Int = R|<local>/i|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] get(): Int
|
||||
|
||||
public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] enum entry ENTRY1: R|MyClass| = LAZY_EXPRESSION
|
||||
public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] enum entry ENTRY2: R|MyClass| = LAZY_EXPRESSION
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun boo([ResolvedTo(RAW_FIR)] a: String): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] fun values(): R|kotlin/Array<MyClass>| {
|
||||
}
|
||||
|
||||
public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|MyClass| {
|
||||
}
|
||||
|
||||
public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] val entries: R|kotlin/enums/EnumEntries<MyClass>|
|
||||
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries<MyClass>|
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun foo(): <implicit> { LAZY_BLOCK }
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
open class B(x: () -> Unit)
|
||||
|
||||
class A() : B(1, {
|
||||
class A(val f: String = "${42}") : B(1, {
|
||||
<expr>foo()</expr>
|
||||
})
|
||||
|
||||
|
||||
+5
-2
@@ -14,13 +14,16 @@ FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallAndExplicitConstructo
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class A : R|B| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] constructor([ResolvedTo(BODY_RESOLVE)] [CorrespondingProperty=/A.f] f: R|kotlin/String| = <strcat>(Int(42))): R|A| {
|
||||
super<R|B|>(Int(1), [ResolvedTo(RAW_FIR)] fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
|
||||
R|/foo|()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val f: R|kotlin/String| = R|<local>/f|
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public final [ResolvedTo(CONTRACTS)] fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
open class IJProject(val init: () -> Unit = {})
|
||||
|
||||
class KotlinIDE : IJProject(init = {
|
||||
fun foo() {
|
||||
<expr>anySymbols</expr>
|
||||
}
|
||||
})
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
KT element: KtNameReferenceExpression
|
||||
FIR element: FirPropertyAccessExpressionImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
<Unresolved name: anySymbols>#
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallInsideImplicitConstructor.kt
|
||||
public open [ResolvedTo(STATUS)] class IJProject : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=IJProject] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/IJProject.init] init: R|() -> kotlin/Unit| = LAZY_EXPRESSION): R|IJProject| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val init: R|() -> kotlin/Unit| = R|<local>/init|
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=IJProject] get(): R|() -> kotlin/Unit|
|
||||
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] class KotlinIDE : R|IJProject| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=KotlinIDE] constructor(): R|KotlinIDE| {
|
||||
super<R|IJProject|>(init = [ResolvedTo(RAW_FIR)] fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
|
||||
local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/Unit| {
|
||||
<Unresolved name: anySymbols>#
|
||||
}
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtTypeReference
|
||||
open class A
|
||||
|
||||
class B(val prop: String = "${foo()}"): <expr>A</expr>()
|
||||
|
||||
fun foo() = 42
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
KT element: KtTypeReference
|
||||
FIR element: FirResolvedTypeRefImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
R|A|
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] superTypeAndGeneratedProperty.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)] class B : R|A| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=B] constructor([ResolvedTo(BODY_RESOLVE)] [CorrespondingProperty=/B.prop] prop: R|kotlin/String| = <strcat>(R|/foo|())): R|B| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|kotlin/String| = R|<local>/prop|
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=B] get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun foo(): R|kotlin/Int| {
|
||||
^foo Int(42)
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtUserType
|
||||
|
||||
enum class MyClass(val i: Int = foo()) : <expr>UnresolvedInterface</expr> {
|
||||
ENTRY1,
|
||||
ENTRY2(42);
|
||||
|
||||
fun boo(a: String) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() = 42
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
KT element: KtUserType
|
||||
FIR element: FirErrorTypeRefImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
<ERROR TYPE REF: Symbol not found for UnresolvedInterface>
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] superTypeOnEnumClass.kt
|
||||
public final [ResolvedTo(BODY_RESOLVE)] enum class MyClass : <ERROR TYPE REF: Symbol not found for UnresolvedInterface>, R|kotlin/Enum<MyClass>| {
|
||||
private [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] constructor([ResolvedTo(BODY_RESOLVE)] [CorrespondingProperty=/MyClass.i] i: R|kotlin/Int| = R|/foo|()): R|MyClass| {
|
||||
super<R|kotlin/Enum<MyClass>|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val i: R|kotlin/Int| = R|<local>/i|
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|kotlin/Int|
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] enum entry ENTRY1: R|MyClass| = LAZY_EXPRESSION
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] enum entry ENTRY2: R|MyClass| = LAZY_EXPRESSION
|
||||
public final [ResolvedTo(STATUS)] fun boo([ResolvedTo(STATUS)] a: R|kotlin/String|): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] fun values(): R|kotlin/Array<MyClass>| {
|
||||
}
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|MyClass| {
|
||||
}
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] val entries: R|kotlin/enums/EnumEntries<MyClass>|
|
||||
public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries<MyClass>|
|
||||
|
||||
}
|
||||
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun foo(): R|kotlin/Int| {
|
||||
^foo Int(42)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<expr>
|
||||
enum class MyClass(val i: Int = foo()) : UnresolvedInterface {
|
||||
ENTRY1,
|
||||
ENTRY2(42);
|
||||
|
||||
fun boo(a: String) {
|
||||
|
||||
}
|
||||
}
|
||||
</expr>
|
||||
|
||||
fun foo() = 42
|
||||
@@ -0,0 +1,55 @@
|
||||
KT element: KtClass
|
||||
FIR element: FirRegularClassImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
public final [ResolvedTo(BODY_RESOLVE)] enum class MyClass : <ERROR TYPE REF: Symbol not found for UnresolvedInterface>, R|kotlin/Enum<MyClass>| {
|
||||
private [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] constructor([ResolvedTo(BODY_RESOLVE)] [CorrespondingProperty=/MyClass.i] i: R|kotlin/Int| = R|/foo|()): R|MyClass| {
|
||||
super<R|kotlin/Enum<MyClass>|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val i: R|kotlin/Int| = R|<local>/i|
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|kotlin/Int|
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] enum entry ENTRY1: R|MyClass| = LAZY_EXPRESSION
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] enum entry ENTRY2: R|MyClass| = LAZY_EXPRESSION
|
||||
public final [ResolvedTo(STATUS)] fun boo([ResolvedTo(STATUS)] a: R|kotlin/String|): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] fun values(): R|kotlin/Array<MyClass>| {
|
||||
}
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|MyClass| {
|
||||
}
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] val entries: R|kotlin/enums/EnumEntries<MyClass>|
|
||||
public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries<MyClass>|
|
||||
|
||||
}
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] enum.kt
|
||||
public final [ResolvedTo(BODY_RESOLVE)] enum class MyClass : <ERROR TYPE REF: Symbol not found for UnresolvedInterface>, R|kotlin/Enum<MyClass>| {
|
||||
private [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] constructor([ResolvedTo(BODY_RESOLVE)] [CorrespondingProperty=/MyClass.i] i: R|kotlin/Int| = R|/foo|()): R|MyClass| {
|
||||
super<R|kotlin/Enum<MyClass>|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val i: R|kotlin/Int| = R|<local>/i|
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|kotlin/Int|
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] enum entry ENTRY1: R|MyClass| = LAZY_EXPRESSION
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] enum entry ENTRY2: R|MyClass| = LAZY_EXPRESSION
|
||||
public final [ResolvedTo(STATUS)] fun boo([ResolvedTo(STATUS)] a: R|kotlin/String|): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] fun values(): R|kotlin/Array<MyClass>| {
|
||||
}
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|MyClass| {
|
||||
}
|
||||
|
||||
public final static [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] val entries: R|kotlin/enums/EnumEntries<MyClass>|
|
||||
public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries<MyClass>|
|
||||
|
||||
}
|
||||
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun foo(): R|kotlin/Int| {
|
||||
^foo Int(42)
|
||||
}
|
||||
+30
@@ -81,6 +81,12 @@ public class OutOfContentRootGetOrBuildFirTestGenerated extends AbstractOutOfCon
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/annotations/annotationOnConstructorProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationOnEnumClass.kt")
|
||||
public void testAnnotationOnEnumClass() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/annotations/annotationOnEnumClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationOnReturnType.kt")
|
||||
public void testAnnotationOnReturnType() throws Exception {
|
||||
@@ -305,6 +311,12 @@ public class OutOfContentRootGetOrBuildFirTestGenerated extends AbstractOutOfCon
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/calls/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callInsideLambdaInsideSuperCallInsideImplicitConstructor.kt")
|
||||
public void testCallInsideLambdaInsideSuperCallInsideImplicitConstructor() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/calls/callInsideLambdaInsideSuperCallInsideImplicitConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("calllTypeArguments.kt")
|
||||
public void testCalllTypeArguments() throws Exception {
|
||||
@@ -1099,6 +1111,18 @@ public class OutOfContentRootGetOrBuildFirTestGenerated extends AbstractOutOfCon
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeAndGeneratedProperty.kt")
|
||||
public void testSuperTypeAndGeneratedProperty() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeAndGeneratedProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeOnEnumClass.kt")
|
||||
public void testSuperTypeOnEnumClass() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeOnEnumClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeArgument.kt")
|
||||
public void testTypeArgument() throws Exception {
|
||||
@@ -1157,6 +1181,12 @@ public class OutOfContentRootGetOrBuildFirTestGenerated extends AbstractOutOfCon
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/classTypeParemeter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enum.kt")
|
||||
public void testEnum() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/enum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enumEntry.kt")
|
||||
public void testEnumEntry() throws Exception {
|
||||
|
||||
+30
@@ -81,6 +81,12 @@ public class SourceGetOrBuildFirTestGenerated extends AbstractSourceGetOrBuildFi
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/annotations/annotationOnConstructorProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationOnEnumClass.kt")
|
||||
public void testAnnotationOnEnumClass() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/annotations/annotationOnEnumClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationOnReturnType.kt")
|
||||
public void testAnnotationOnReturnType() throws Exception {
|
||||
@@ -305,6 +311,12 @@ public class SourceGetOrBuildFirTestGenerated extends AbstractSourceGetOrBuildFi
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/calls/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callInsideLambdaInsideSuperCallInsideImplicitConstructor.kt")
|
||||
public void testCallInsideLambdaInsideSuperCallInsideImplicitConstructor() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/calls/callInsideLambdaInsideSuperCallInsideImplicitConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("calllTypeArguments.kt")
|
||||
public void testCalllTypeArguments() throws Exception {
|
||||
@@ -1099,6 +1111,18 @@ public class SourceGetOrBuildFirTestGenerated extends AbstractSourceGetOrBuildFi
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeAndGeneratedProperty.kt")
|
||||
public void testSuperTypeAndGeneratedProperty() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeAndGeneratedProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTypeOnEnumClass.kt")
|
||||
public void testSuperTypeOnEnumClass() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/types/superTypeOnEnumClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeArgument.kt")
|
||||
public void testTypeArgument() throws Exception {
|
||||
@@ -1157,6 +1181,12 @@ public class SourceGetOrBuildFirTestGenerated extends AbstractSourceGetOrBuildFi
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/classTypeParemeter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enum.kt")
|
||||
public void testEnum() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/enum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enumEntry.kt")
|
||||
public void testEnumEntry() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user