Ticket #278: poly_dtor.cfa
| File poly_dtor.cfa, 402 bytes (added by , 3 years ago) |
|---|
| Line | |
|---|---|
| 1 | struct myType; |
| 2 | void foo( myType & t ); |
| 3 | void ^?{}( myType & t ); |
| 4 | |
| 5 | forall( T ) |
| 6 | trait embedded { |
| 7 | void foo( T & ); |
| 8 | }; |
| 9 | |
| 10 | forall( T | embedded( T ) ) { |
| 11 | struct A { |
| 12 | inline T; |
| 13 | }; |
| 14 | |
| 15 | void ^?{}( A(T) & t ) { printf("A\n"); } |
| 16 | } |
| 17 | |
| 18 | struct myType {}; |
| 19 | void foo( myType & t ) {} |
| 20 | void ^?{}( myType & t ) { printf("T\n"); } |
| 21 | |
| 22 | int main() { |
| 23 | { |
| 24 | A( myType ) a; |
| 25 | } |
| 26 | } |