| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
---- |
| 4 |
fail_compilation/fail263.d(20): Error: function `f` is not callable using argument types `(const(byte)*)` |
| 5 |
fail_compilation/fail263.d(20): cannot pass argument `cast(const(byte)*)A` of type `const(byte)*` to parameter `byte* p` |
| 6 |
fail_compilation/fail263.d(14): `fail263.f(byte* p)` declared here |
| 7 |
---- |
| 8 |
*/ |
| 9 |
|
| 10 |
// https://issues.dlang.org/show_bug.cgi?id=2766 |
| 11 |
// DMD hangs with 0%cpu |
| 12 |
const byte[] A = [ cast(byte)0 ]; |
| 13 |
|
| 14 |
void f(byte* p) |
| 15 |
{ |
| 16 |
} |
| 17 |
|
| 18 |
void func() |
| 19 |
{ |
| 20 |
f(A.ptr); |
| 21 |
} |