MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test16188.d
blob0bd052ca6db1bc40d86a53052cef07339b38cfd4
1 /* REQUIRED_ARGS: -preview=bitfields
2 * TEST_OUTPUT:
3 ---
4 fail_compilation/test16188.d(101): Error: no property `name` for `Where()` of type `test16188.Where`
5 fail_compilation/test16188.d(101): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message
6 fail_compilation/test16188.d(103): struct `Where` defined here
7 ---
8 */
10 // https://issues.dlang.org/show_bug.cgi?id=16188
12 /* This produces the message:
13 * Error: no property 'name' for type 'Where'
14 * when the actual error is 'getMember is undefined'.
15 * This happens because errors are gagged when opDispatch() is compiled,
16 * I don't understand why.
19 #line 100
21 void where() { Where().name; }
23 struct Where
25 void opDispatch(string name)()
27 alias FieldType = typeof(getMember);
28 WhereField!FieldType;
32 struct WhereField(FieldType) {}