[LL FIR] getOrBuildFir tests should render fir file

We need it to see how many declarations were resolved

^KT-59266
This commit is contained in:
Dmitrii Gridin
2023-06-13 15:09:13 +02:00
committed by Space Team
parent 8c2f1acc7e
commit aad99fd6eb
185 changed files with 2313 additions and 130 deletions
@@ -6,4 +6,12 @@ FIR element rendered:
public final [ResolvedTo(BODY_RESOLVE)] val p: R|kotlin/String|by ERROR_EXPR(Should have delegate)
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| {
^ D|/p|.<Unresolved name: getValue>#(Null(null), ::R|/p|)
}
}
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] delegatedProperty.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public final [ResolvedTo(BODY_RESOLVE)] val p: R|kotlin/String|by ERROR_EXPR(Should have delegate)
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| {
^ D|/p|.<Unresolved name: getValue>#(Null(null), ::R|/p|)
}
@@ -5,3 +5,25 @@ FIR source kind: KtRealSourceElementKind
FIR element rendered:
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| {
}
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] duplicatedClasses.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public final [ResolvedTo(STATUS)] class SomeClass : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|SomeClass| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(STATUS)] val prop: <implicit> = LAZY_EXPRESSION
public [ResolvedTo(STATUS)] get(): <implicit>
}
public final [ResolvedTo(STATUS)] class SomeClass : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|SomeClass| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| {
}
}
@@ -4,3 +4,25 @@ FIR source kind: KtRealSourceElementKind
FIR element rendered:
[ResolvedTo(BODY_RESOLVE)] p: R|kotlin/Int|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] duplicatedClassesFunctionParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public final [ResolvedTo(STATUS)] class SomeClass : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|SomeClass| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(STATUS)] val prop: <implicit> = LAZY_EXPRESSION
public [ResolvedTo(STATUS)] get(): <implicit>
}
public final [ResolvedTo(STATUS)] class SomeClass : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|SomeClass| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] p: R|kotlin/Int|): R|kotlin/Unit| {
}
}
@@ -4,3 +4,10 @@ FIR source kind: KtRealSourceElementKind
FIR element rendered:
@<ERROR TYPE REF: Symbol not found for Volatile>[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] incompletePropertyWithAnnotation.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@<ERROR TYPE REF: Symbol not found for Volatile>[Types]() private final [ResolvedTo(BODY_RESOLVE)] var <no name provided>: <ERROR TYPE REF: Cannot infer variable type without initializer / getter / delegate>
private [ResolvedTo(BODY_RESOLVE)] get(): <ERROR TYPE REF: Cannot infer variable type without initializer / getter / delegate>
private [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: <ERROR TYPE REF: Cannot infer variable type without initializer / getter / delegate>): R|kotlin/Unit|
@@ -3,4 +3,14 @@ FIR element: FirPropertyAccessExpressionImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|<local>/anyClass|
R|<local>/anyClass|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] javaClassLiteral.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public final [ResolvedTo(BODY_RESOLVE)] fun main([ResolvedTo(BODY_RESOLVE)] args: R|kotlin/Array<kotlin/String>|): R|kotlin/Unit| {
[ResolvedTo(BODY_RESOLVE)] lval anyClass: R|kotlin/Any| = R|kotlin/Any.Any|()
R|/funOne|(<ERROR TYPE REF: Qualified expression with unexpected selector>ERROR_EXPR(Incorrect selector expression)R|<local>/anyClass|)
}
public final [ResolvedTo(CONTRACTS)] fun funOne([ResolvedTo(CONTRACTS)] x: R|kotlin/Any|): R|kotlin/Unit| {
}
@@ -3,4 +3,22 @@ FIR element: FirDanglingModifierListImpl
FIR source kind: DanglingModifierList
FIR element rendered:
<DANGLING MODIFIER: Top level declaration expected>
<DANGLING MODIFIER: Top level declaration expected>
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] secondaryConstructor.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public final [ResolvedTo(BODY_RESOLVE)] annotation class JsQualifier : R|kotlin/Annotation|, R|kotlin/Annotation| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|JsQualifier| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(BODY_RESOLVE)] val value: R|kotlin/String|
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String|
public final [ResolvedTo(BODY_RESOLVE)] fun <no name provided>(): R|kotlin/Unit| {
<Unresolved name: get>#
}
<DANGLING MODIFIER: Top level declaration expected>
}