Add test for obsolete issue
#KT-38420 Obsolete
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
val list: List<String> = buildList {
|
||||
val inner: List<String> = maybe() ?: emptyList()
|
||||
|
||||
addAll(inner)
|
||||
}
|
||||
|
||||
fun maybe(): List<String>? = null
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
@kotlin.OptIn(markerClass = {kotlin.ExperimentalStdlibApi::class}) public val list: kotlin.collections.List<kotlin.String>
|
||||
public fun maybe(): kotlin.collections.List<kotlin.String>?
|
||||
+5
@@ -2037,6 +2037,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt36220.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt38420.kt")
|
||||
public void testKt38420() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38420.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedLambdaInferenceWithListMap.kt")
|
||||
public void testNestedLambdaInferenceWithListMap() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt");
|
||||
|
||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+5
@@ -2037,6 +2037,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt36220.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt38420.kt")
|
||||
public void testKt38420() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38420.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedLambdaInferenceWithListMap.kt")
|
||||
public void testNestedLambdaInferenceWithListMap() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt");
|
||||
|
||||
Reference in New Issue
Block a user