d: Merge dmd. druntime e770945277, phobos 6d6e0b9b9
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag8648.d
blob8066d6e8bbe51ff80229e7199659de9dc934b5c6
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag8648.d(18): Error: undefined identifier `X`
5 fail_compilation/diag8648.d(29): Error: template `foo` is not callable using argument types `!()(Foo!(int, 1))`
6 fail_compilation/diag8648.d(18): Candidate is: `foo(T, n)(X!(T, n))`
7 fail_compilation/diag8648.d(20): Error: undefined identifier `a`
8 fail_compilation/diag8648.d(31): Error: template `bar` is not callable using argument types `!()(Foo!(int, 1))`
9 fail_compilation/diag8648.d(20): Candidate is: `bar(T)(Foo!(T, a))`
10 fail_compilation/diag8648.d(20): Error: undefined identifier `a`
11 fail_compilation/diag8648.d(32): Error: template `bar` is not callable using argument types `!()(Foo!(int, f))`
12 fail_compilation/diag8648.d(20): Candidate is: `bar(T)(Foo!(T, a))`
13 ---
16 struct Foo(T, alias a) {}
18 void foo(T, n)(X!(T, n) ) {} // undefined identifier 'X'
20 void bar(T)(Foo!(T, a) ) {} // undefined identifier 'a'
22 void main()
24 template f() {}
26 Foo!(int, 1) x;
27 Foo!(int, f) y;
29 foo(x);
31 bar(x); // expression '1' vs undefined Type 'a'
32 bar(y); // symbol 'f' vs undefined Type 'a'