gcc/testsuite/gdc.dg/pr96254b.d
raw| 1 | // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96254 |
| 2 | // { dg-do compile } |
| 3 | mixin template test() |
| 4 | { |
| 5 | int next; |
| 6 | } |
| 7 | |
| 8 | void foo(alias l)() |
| 9 | { |
| 10 | l.next = 0; // { dg-error "cannot get frame pointer to 'D main'" } |
| 11 | } |
| 12 | |
| 13 | void bar(alias l, alias t)() |
| 14 | { |
| 15 | l.next = 0; // { dg-error "cannot get frame pointer to 'D main'" } |
| 16 | } |
| 17 | |
| 18 | void main() |
| 19 | { |
| 20 | mixin test l1; |
| 21 | mixin test l2; |
| 22 | foo!(l1); |
| 23 | bar!(l1,l2); |
| 24 | } |