added another test case to check vars work in object declarations

This commit is contained in:
James Strachan
2012-07-05 08:51:47 +01:00
parent 98f6650236
commit 276bfae401
2 changed files with 15 additions and 0 deletions
@@ -39,6 +39,9 @@ public final class ObjectTest extends SingleFileTranslationTest {
fooBoxTest();
}
public void testObjectDeclarationWithVars() throws Exception {
fooBoxTest();
}
public void testObjectInMethod() throws Exception {
fooBoxTest();
@@ -0,0 +1,12 @@
package foo
object State {
val c = 2
val b = 1
}
fun box() : Boolean {
if (State.c != 2) return false
if (State.b != 1) return false
return true
}