Added test for EA-49318.

This commit is contained in:
Evgeny Gerashchenko
2014-10-09 20:56:37 +04:00
parent ad1b460bea
commit fa70192f75
2 changed files with 22 additions and 0 deletions
@@ -0,0 +1,16 @@
fun example(value : Int) {
val result: Int = if (value == 0) 1
else if (value == 1) 2
else throw IllegalArgumentException()
result
}
fun <T, S, U : T> foo(u: U) where U : S {}
fun main(args : Array<String>) {
foo(null!!)
}
fun box() = "OK"
@@ -5756,6 +5756,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/regressions"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("ea49318.kt")
public void testEa49318() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/ea49318.kt");
doTest(fileName);
}
@TestMetadata("kt3173.kt")
public void testKt3173() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3173.kt");