Regression test #KT-9529 Obsolete
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
// See KT-9529 Smart cast causes code to be incompilable
|
||||||
|
|
||||||
|
fun <T : Any> foo(o: T): Collection<T> {
|
||||||
|
if (o is String) {
|
||||||
|
return listOf(o)
|
||||||
|
}
|
||||||
|
return listOf(o)
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ T : kotlin.Any> foo(/*0*/ o: T): kotlin.collections.Collection<T>
|
||||||
@@ -1168,6 +1168,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("listOfGeneric.kt")
|
||||||
|
public void testListOfGeneric() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/listOfGeneric.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("withChangesToNull.kt")
|
@TestMetadata("withChangesToNull.kt")
|
||||||
public void testWithChangesToNull() throws Exception {
|
public void testWithChangesToNull() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/withChangesToNull.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/withChangesToNull.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user