Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/ice11856_1.d

raw
1 /*
2 TEST_OUTPUT:
3 ----
4 fail_compilation/ice11856_1.d(18): Error: no property `g` for `A()` of type `A`
5 fail_compilation/ice11856_1.d(18): the following error occured while looking for a UFCS match
6 fail_compilation/ice11856_1.d(18): Error: template `g` is not callable using argument types `!()(A)`
7 fail_compilation/ice11856_1.d(16): Candidate is: `g(T)(T x)`
8 with `T = A`
9 must satisfy the following constraint:
10 ` is(typeof(x.f()))`
11 ----
12 */
13 struct A {}
14
15 void f(T)(T x) if (is(typeof(x.g()))) {}
16 void g(T)(T x) if (is(typeof(x.f()))) {}
17
18 void main() { A().g(); }