d: Merge dmd. druntime e770945277, phobos 6d6e0b9b9
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail322.d
blobfaaab68a6ee720a57ba810abaa0ba76aeb2aac77
1 /*
2 TEST_OUTPUT:
3 ----
4 fail_compilation/fail322.d(15): Error: function `digestToString2` is not callable using argument types `(string)`
5 fail_compilation/fail322.d(15): cannot pass rvalue argument `"1234567890123456"` of type `string` to parameter `ref char[16] digest`
6 fail_compilation/fail322.d(20): `fail322.digestToString2(ref char[16] digest)` declared here
7 fail_compilation/fail322.d(17): Error: function `digestToString2` is not callable using argument types `(const(char[16]))`
8 fail_compilation/fail322.d(17): cannot pass argument `s` of type `const(char[16])` to parameter `ref char[16] digest`
9 fail_compilation/fail322.d(20): `fail322.digestToString2(ref char[16] digest)` declared here
10 ----
13 void main()
15 digestToString2("1234567890123456");
16 const char[16] s;
17 digestToString2(s);
20 void digestToString2(ref char[16] digest)
22 assert(digest[0] == 0xc3);
23 assert(digest[15] == 0x3b);