aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/pr96254b.d
blob: 02e3c484d26e837c71bbc5333b54e5256c495026 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96254
// { dg-do compile }
mixin template test()
{
    int next;
}

void foo(alias l)()
{
    l.next = 0; // { dg-error "cannot get frame pointer to 'D main'" }
}

void bar(alias l, alias t)()
{
    l.next = 0; // { dg-error "cannot get frame pointer to 'D main'" }
}

void main()
{
    mixin test l1;
    mixin test l2;
    foo!(l1);
    bar!(l1,l2);
}