d: Merge upstream dmd, druntime 26f049fb26, phobos 330d6a4fd.
[official-gcc.git] / gcc / testsuite / gdc.test / compilable / b9490.d
blob433163db6ccce9f781af163f168cfe482f590c61
1 // https://issues.dlang.org/show_bug.cgi?id=9490
2 class A
4 int[1] arr;
6 this()
8 assert(arr.length);
9 assert((arr).length);
13 class C
15 struct Foo { int a; void funcToo(){} }
16 Foo foo;
18 auto get(){return foo;}
20 void test()
22 // Error: need 'this' to access member a
23 (foo).a = 1;
24 (foo).funcToo();
25 (get()).a = 2;
29 struct S { int i; }
30 struct S1 { S s; }
31 void f(int) { }
33 void main()
35 S1 s1;
36 f(s1.s.tupleof); // OK
37 f((s1.s).tupleof); // Error: need 'this' to access member s