MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test21025.d
blob85641998751954a631a845215c607a4afb5c3f63
1 // https://issues.dlang.org/show_bug.cgi?id=21025
2 // REQUIRED_ARGS: -preview=dip1021
4 /*
5 TEST_OUTPUT:
6 ---
7 fail_compilation/test21025.d(15): Error: variable `r` cannot be read at compile time
8 fail_compilation/test21025.d(15): called from here: `binaryFun(r, r)`
9 fail_compilation/test21025.d(24): Error: template `test21025.uniq` is not callable using argument types `!()(void[])`
10 fail_compilation/test21025.d(14): Candidate is: `uniq()(int[] r)`
11 ---
14 void uniq()(int[] r)
15 if (binaryFun(r, r)) {}
17 bool binaryFun(T, U)(T, U)
19 return true;
22 void generateStatements()
24 uniq([]);