[LL API] Add tests for 'out of content root' analysis mode

This commit is contained in:
Yan Zhulanow
2022-12-14 20:37:14 +09:00
committed by Space Team
parent e4c2902e81
commit f1edbc1a14
58 changed files with 2698 additions and 280 deletions
@@ -0,0 +1,6 @@
KT element: KtDestructuringDeclarationEntry
FIR element: FirPropertyImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
lval a: <ERROR TYPE REF: Unresolved name: component1> = R|<local>/<destruct>|.<Unresolved name: component1>#()
@@ -0,0 +1,9 @@
KT element: KtPropertyDelegate
FIR element: FirFunctionCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
<Unresolved name: lazy>#(<L> = lazy@fun <anonymous>(): R|kotlin/Int| <inline=Unknown> {
^ Int(1)
}
)
@@ -0,0 +1,9 @@
KT element: KtCallExpression
FIR element: FirFunctionCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
<Unresolved name: lazy>#(<L> = lazy@fun <anonymous>(): R|kotlin/Int| <inline=Unknown> {
^ Int(1)
}
)
@@ -0,0 +1,6 @@
KT element: KtCallExpression
FIR element: FirFunctionCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
<Unresolved name: mutableListOf>#<R|kotlin/String|>()
@@ -0,0 +1,8 @@
KT element: KtLambdaArgument
FIR element: FirAnonymousFunctionExpressionImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
run@fun <anonymous>(): R|kotlin/Int| <inline=Unknown> {
^ Int(1)
}
@@ -0,0 +1,6 @@
KT element: KtThrowExpression
FIR element: FirThrowExpressionImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
throw <Unresolved name: IllegalStateException>#()
@@ -0,0 +1,20 @@
FILE: class.kt
public final [BODY_RESOLVE] class B : R|kotlin/Any| {
public [BODY_RESOLVE] constructor(): R|B| {
super<R|kotlin/Any|>()
}
public final [BODY_RESOLVE] fun q(): <ERROR TYPE REF: Symbol not found for C> {
}
private final [BODY_RESOLVE] val y: <ERROR TYPE REF: Symbol not found for C> = this@R|/B|.R|/B.q|()
private [BODY_RESOLVE] get(): <ERROR TYPE REF: Symbol not found for C>
public final [BODY_RESOLVE] fun foo([BODY_RESOLVE] a: <ERROR TYPE REF: Symbol not found for A>): <ERROR TYPE REF: Unresolved name: with> {
^foo <Unresolved name: with>#(R|<local>/a|, <L> = [BODY_RESOLVE] with@fun <anonymous>(): <ERROR TYPE REF: Unresolved name: bar> <inline=Unknown> {
^ <Unresolved name: bar>#(String(a), this@R|/B|.R|/B.y|)
}
)
}
}
@@ -0,0 +1,6 @@
FILE: functionWithImplicitType.kt
public final [BODY_RESOLVE] fun <[BODY_RESOLVE] T> checkSubtype([BODY_RESOLVE] t: R|T|): R|T| {
^checkSubtype R|<local>/t|
}
public final [BODY_RESOLVE] val ab: R|kotlin/collections/List<kotlin/Int>?| = R|/checkSubtype|<R|kotlin/collections/List<kotlin/Int>?|>(<Unresolved name: Collections>#.<Unresolved name: emptyList>#<R|kotlin/Int|>())
public [BODY_RESOLVE] get(): R|kotlin/collections/List<kotlin/Int>?|
@@ -1,3 +1,5 @@
// SKIP_WHEN_OUT_OF_CONTENT_ROOT
@JvmInline
value class Value(val value: Int) {
fun resolveMe() {}
@@ -1,3 +1,5 @@
// SKIP_WHEN_OUT_OF_CONTENT_ROOT
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
@@ -1,2 +1,4 @@
// SKIP_WHEN_OUT_OF_CONTENT_ROOT
val <T : Int, K> T.resolveMe: K
get() = TODO()