diff --git a/test/compiler/literals/array-literal-in-class.ooc b/test/compiler/literals/array-literal-in-class.ooc new file mode 100644 index 00000000..28b4e40c --- /dev/null +++ b/test/compiler/literals/array-literal-in-class.ooc @@ -0,0 +1,19 @@ +Foo: class{ + test := [1, 2, 3] + init: func +} + +Bar: class{ + test := static const [1, 2, 3] + init: func +} + +describe("ArrayLiteral should be correctly unwrapped",|| + foo := Foo new() + assert(foo test[0] == 1) + assert(foo test[1] == 2) + assert(foo test[2] == 3) + assert(Bar test[0] == 1) + assert(Bar test[1] == 2) + assert(Bar test[2] == 3) +)