aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/test15784.d
blob: 33b1bf3c9194c5b682023b8549da92d41633334a (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// PERMUTE_ARGS:

template AddField(T)
{
    T b;
    this(Args...)(T b, auto ref Args args)
    {
        this.b = b;
        this(args);
    }
}

template construcotrs()
{
    int a;
    this(int a)
    {
        this.a = a;
    }
}

class B
{
    mixin construcotrs;
    mixin AddField!(string);
}

class C : B
{
    this(A...)(A args)
    {
        // The called super ctor is an overload set.
        super(args);
    }
}

struct S
{
    mixin construcotrs;
    mixin AddField!(string);
}

void main()
{
    auto s = S("bar", 15);
    auto c = new C("bar", 15);
}