Constraint Foo on T! should be turned into Foo! on T

This commit is contained in:
Andrey Breslav
2014-08-25 17:55:30 +04:00
parent 6cb1d2e3f7
commit 141e731f39
3 changed files with 30 additions and 0 deletions
@@ -0,0 +1,8 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
trait Foo
fun test() {
var nullable: Foo? = null
val foo: Collection<Foo> = java.util.Collections.singleton(nullable)
}
@@ -7795,6 +7795,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("singleton.kt")
public void testSingleton() throws Exception {
doTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/string.kt");