Debian Codegraph @

src/test/01-Basic/248-array-popfront.ck

raw
1 // verify array pop front with objects
2
3 // class
4 class Foo
5 {
6 int num;
7 fun @construct(int x) { x => num; }
8 }
9
10 // array
11 Foo arr[0];
12 // objects
13 arr << new Foo(1) << new Foo(2);
14 // pop front
15 arr.popFront();
16 // test
17 if( arr[0].num == 2 ) <<< "success" >>>;
18
19