source: tests/poly-member.cfa @ 50e04cc

Last change on this file since 50e04cc was bdf40650, checked in by Andrew Beach <ajbeach@…>, 4 weeks ago

Address-of is now moved under casts of any type and is done so recursively. Solves trac#166 and a modified version of the code there has been added as a test.

  • Property mode set to 100644
File size: 289 bytes
Line 
1forall( T & )
2struct Proxy {};
3
4struct MonoCell {
5        Proxy(int) data;
6};
7
8forall( T & )
9struct PolyCell {
10        Proxy(T) data;
11};
12
13int main() {
14        {
15                MonoCell thing1;
16                Proxy(int) & thing2 = thing1.data;
17        }
18
19        {
20                PolyCell(int) thing1;
21                Proxy(int) & thing2 = thing1.data;
22        }
23
24        printf("Done\n");
25}
Note: See TracBrowser for help on using the repository browser.