FIR: add original test from KT-49925 (passes)
This commit is contained in:
committed by
teamcity
parent
2f32214106
commit
dde4c46df7
+6
@@ -5136,6 +5136,12 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildList.kt")
|
||||
public void testBuildList() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/problems/buildList.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("expectedType.kt")
|
||||
public void testExpectedType() throws Exception {
|
||||
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
FILE: buildList.kt
|
||||
public final class Wrapper : R|kotlin/Any| {
|
||||
public constructor(tag: R|kotlin/String|): R|Wrapper| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val tag: R|kotlin/String| = R|<local>/tag|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public final fun foo(wrappers: R|kotlin/collections/List<Wrapper>|): R|kotlin/collections/List<kotlin/String>| {
|
||||
^foo R|kotlin/collections/buildList|<R|kotlin/String|>(<L> = buildList@fun R|kotlin/collections/MutableList<kotlin/String>|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
R|<local>/wrappers|.R|kotlin/collections/mapTo|<R|Wrapper|, R|kotlin/String|, R|kotlin/collections/MutableList<kotlin/String>|>(this@R|special/anonymous|, <L> = mapTo@fun <anonymous>(it: R|Wrapper|): R|kotlin/String| <inline=Inline, kind=UNKNOWN> {
|
||||
^ R|<local>/it|.R|/Wrapper.tag|
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class Wrapper(val tag: String)
|
||||
|
||||
fun foo(wrappers: List<Wrapper>) = buildList {
|
||||
wrappers.mapTo(this) { it.tag }
|
||||
}
|
||||
+6
@@ -5136,6 +5136,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildList.kt")
|
||||
public void testBuildList() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/problems/buildList.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("expectedType.kt")
|
||||
public void testExpectedType() throws Exception {
|
||||
|
||||
+6
@@ -5136,6 +5136,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildList.kt")
|
||||
public void testBuildList() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/problems/buildList.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("expectedType.kt")
|
||||
public void testExpectedType() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user