1 // REQUIRED_ARGS: -vgc -o-
4 /***************** AssignExp *******************/
9 compilable/vgc3.d(16): vgc: setting 'length' may cause GC allocation
10 compilable/vgc3.d(17): vgc: setting 'length' may cause GC allocation
11 compilable/vgc3.d(18): vgc: setting 'length' may cause GC allocation
14 void testArrayLength(int[] a)
21 /***************** CallExp *******************/
39 /****************** Closure ***********************/
41 @nogc void takeDelegate2(scope int delegate() dg) {}
42 @nogc void takeDelegate3( int delegate() dg) {}
47 compilable/vgc3.d(51): vgc: using closure causes GC allocation
48 compilable/vgc3.d(63): vgc: using closure causes GC allocation
54 int bar() { return x; }
60 int bar() { return x; }
61 takeDelegate2(&bar); // no error
66 int bar() { return x; }