[FIR TEST] Add test with unresolved member in nested lambdas (KT-36887)
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
|||||||
|
class First(val member: Int)
|
||||||
|
|
||||||
|
class Second {
|
||||||
|
val list = listOf(1, 2, 3, "")
|
||||||
|
|
||||||
|
val data = First(42)
|
||||||
|
|
||||||
|
val test = with(data) {
|
||||||
|
list.filterIsInstance<Int>().filter {
|
||||||
|
it == <!UNRESOLVED_REFERENCE!>member<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
FILE: withInInitializer.kt
|
||||||
|
public final class First : R|kotlin/Any| {
|
||||||
|
public constructor(member: R|kotlin/Int|): R|First| {
|
||||||
|
super<R|kotlin/Any|>()
|
||||||
|
}
|
||||||
|
|
||||||
|
public final val member: R|kotlin/Int| = R|<local>/member|
|
||||||
|
public get(): R|kotlin/Int|
|
||||||
|
|
||||||
|
}
|
||||||
|
public final class Second : R|kotlin/Any| {
|
||||||
|
public constructor(): R|Second| {
|
||||||
|
super<R|kotlin/Any|>()
|
||||||
|
}
|
||||||
|
|
||||||
|
public final val list: R|kotlin/collections/List<kotlin/Comparable<it(kotlin/String & kotlin/Int)>>| = R|kotlin/collections/listOf|<R|kotlin/Comparable<it(kotlin/String & kotlin/Int)>|>(vararg(Int(1), Int(2), Int(3), String()))
|
||||||
|
public get(): R|kotlin/collections/List<kotlin/Comparable<it(kotlin/String & kotlin/Int)>>|
|
||||||
|
|
||||||
|
public final val data: R|First| = R|/First.First|(Int(42))
|
||||||
|
public get(): R|First|
|
||||||
|
|
||||||
|
public final val test: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/with|<R|First|, R|kotlin/collections/List<kotlin/Int>|>(this@R|/Second|.R|/Second.data|, <L> = with@fun R|First|.<anonymous>(): R|kotlin/collections/List<kotlin/Int>| <kind=EXACTLY_ONCE> {
|
||||||
|
^ this@R|/Second|.R|/Second.list|.R|kotlin/collections/filterIsInstance|<R|kotlin/Int|>().R|kotlin/collections/filter|<R|kotlin/Int|>(<L> = filter@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=UNKNOWN> {
|
||||||
|
^ ==(R|<local>/it|, <Unresolved name: member>#)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public get(): R|kotlin/collections/List<kotlin/Int>|
|
||||||
|
|
||||||
|
}
|
||||||
Generated
+5
@@ -699,6 +699,11 @@ public class FirDiagnosticsWithStdlibTestGenerated extends AbstractFirDiagnostic
|
|||||||
public void testWeakHashMap() throws Exception {
|
public void testWeakHashMap() throws Exception {
|
||||||
runTest("compiler/fir/resolve/testData/resolveWithStdlib/problems/weakHashMap.kt");
|
runTest("compiler/fir/resolve/testData/resolveWithStdlib/problems/weakHashMap.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("withInInitializer.kt")
|
||||||
|
public void testWithInInitializer() throws Exception {
|
||||||
|
runTest("compiler/fir/resolve/testData/resolveWithStdlib/problems/withInInitializer.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/fir/resolve/testData/resolveWithStdlib/smartcasts")
|
@TestMetadata("compiler/fir/resolve/testData/resolveWithStdlib/smartcasts")
|
||||||
|
|||||||
Reference in New Issue
Block a user