KT-234 Force when() expressions to have an 'else' branch

KT-973 Unreachable code
This commit is contained in:
svtk
2012-01-18 13:31:42 +04:00
parent 94e3cc9976
commit becd713111
23 changed files with 175 additions and 50 deletions
@@ -1,6 +1,5 @@
package org.jetbrains.jet.codegen;
import jet.NoPatternMatchedException;
import jet.Tuple2;
import java.lang.reflect.Method;
@@ -25,7 +24,7 @@ public class PatternMatchingTest extends CodegenTestCase {
loadFile();
Method foo = generateFunction();
assertTrue((Boolean) foo.invoke(null, 0));
assertThrows(foo, NoPatternMatchedException.class, null, 1);
assertThrows(foo, Exception.class, null, 1);
}
public void testPattern() throws Exception {