Failing test isolated

This commit is contained in:
Andrey Breslav
2014-06-30 17:42:20 +04:00
parent b665a1998b
commit a39d2bc24f
2 changed files with 30 additions and 0 deletions
@@ -0,0 +1,24 @@
// FILE: foo/Base.java
package foo;
public interface Base<T> {}
// FILE: foo/HS.java
package foo;
public class HS<T> extends Base<T> {}
// FILE: k.kt
import foo.*;
import java.util.HashSet
fun <T, C: Base<T>> convert(src: HS<T>, dest: C): C = throw Exception("$src $dest")
fun test(l: HS<Int>) {
//todo should be inferred
val r = <!TYPE_INFERENCE_UPPER_BOUND_VIOLATED!>convert<!>(l, <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>HS<!>())
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>r<!>: Int
}
@@ -7707,6 +7707,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("inference.kt")
public void testInference() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/inference.kt");
doTest(fileName);
}
@TestMetadata("safeCall.kt")
public void testSafeCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/safeCall.kt");