map String methods; don't try to push void values on stack

This commit is contained in:
Dmitry Jemerov
2011-05-26 19:32:39 +04:00
parent 58f50a8046
commit 2a0567d15b
2 changed files with 27 additions and 1 deletions
@@ -55,4 +55,10 @@ public class PatternMatchingTest extends CodegenTestCase {
Method foo = generateFunction();
assertEquals("something", foo.invoke(null, ""));
}
public void testNoReturnType() throws Exception {
loadText("fun foo(x: String) = when(x) { is * => return \"x\" }");
Method foo = generateFunction();
assertEquals("x", foo.invoke(null, ""));
}
}