d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / b20875.d
blob8fd85055b306fa76ee93b6059415673d6a2beb0c
1 module b20875;
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/b20875.d(10): Error: template instance `Foo!int` does not match template declaration `Foo(alias T : None!U, U...)`
7 fail_compilation/b20875.d(10): while evaluating: `static assert(Foo!int)`
8 fail_compilation/b20875.d(11): Error: template instance `Bar!int` does not match template declaration `Bar(alias T : None!U, U...)`
9 fail_compilation/b20875.d(11): while evaluating: `static assert(!Bar!int)`
10 fail_compilation/b20875.d(14): Error: template parameter specialization for a type must be a type and not `NotAType()`
11 fail_compilation/b20875.d(15): while looking for match for `Baz!int`
12 fail_compilation/b20875.d(15): while evaluating: `static assert(!Baz!int)`
13 ---
16 #line 7
18 enum Foo(alias T : None!U, U...) = true;
19 enum Bar(alias T : None!U, U...) = false;
20 static assert( Foo!(int));
21 static assert(!Bar!(int));
23 template NotAType(){}
24 enum Baz(alias T : NotAType) = false;
25 static assert(!Baz!(int));
27 void main(){}