aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/ice6538.d
blob: f7c639d500a22fa20e5656d2e669dae25ca22b49 (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


/**************************************/
// https://issues.dlang.org/show_bug.cgi?id=9361

/*
TEST_OUTPUT:
---
fail_compilation/ice6538.d(23): Error: expression `super` is not a valid template value argument
fail_compilation/ice6538.d(28): Error: none of the overloads of template `ice6538.D.foo` are callable using argument types `!()()`
fail_compilation/ice6538.d(23):        Candidate is: `foo()()`
---
*/

template Sym(alias A)
{
    enum Sym = true;
}

class C {}
class D : C
{
    void foo()() if (Sym!(super)) {}
}
void test9361b()
{
    auto d = new D();
    d.foo();
}