boxing for variables

This commit is contained in:
Dmitry Jemerov
2011-04-07 16:12:40 +02:00
parent a053bda91b
commit 3250b8cfa9
4 changed files with 61 additions and 7 deletions
@@ -233,6 +233,13 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
assertEquals(239, main.invoke(null));
}
public void testBoxVariable() throws Exception {
loadText("fun foo(): Int? { var x = 239; return x; }");
System.out.println(generateToText());
final Method main = generateFunction();
assertEquals(239, main.invoke(null));
}
public void testLong() throws Exception {
loadText("fun foo(a: Long, b: Long): Long = a + b");
System.out.println(generateToText());