| 1 |
|
| 2 |
|
| 3 |
/**************************************/ |
| 4 |
// https://issues.dlang.org/show_bug.cgi?id=9361 |
| 5 |
|
| 6 |
/* |
| 7 |
TEST_OUTPUT: |
| 8 |
--- |
| 9 |
fail_compilation/ice6538.d(23): Error: template instance `Sym!(super)` expression `super` is not a valid template value argument |
| 10 |
fail_compilation/ice6538.d(28): Error: template `foo` is not callable using argument types `!()()` |
| 11 |
fail_compilation/ice6538.d(23): Candidate is: `foo()()` |
| 12 |
--- |
| 13 |
*/ |
| 14 |
|
| 15 |
template Sym(alias A) |
| 16 |
{ |
| 17 |
enum Sym = true; |
| 18 |
} |
| 19 |
|
| 20 |
class C {} |
| 21 |
class D : C |
| 22 |
{ |
| 23 |
void foo()() if (Sym!(super)) {} |
| 24 |
} |
| 25 |
void test9361b() |
| 26 |
{ |
| 27 |
auto d = new D(); |
| 28 |
d.foo(); |
| 29 |
} |