MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail9891.d
blob791e734349f4eca8d3ac4d7a4b35d8d9cec5f34d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail9891.d(13): Error: expression `i` of type `immutable(int)` is not implicitly convertible to type `ref int` of parameter `n`
5 fail_compilation/fail9891.d(18): Error: expression `i` of type `immutable(int)` is not implicitly convertible to type `out int` of parameter `n`
6 fail_compilation/fail9891.d(23): Error: `prop()` is not an lvalue and cannot be modified
7 ---
8 */
10 immutable int i;
11 int prop() { return 0; }
13 void f1(ref int n = i)
15 ++n;
18 void f2(out int n = i)
20 ++n;
23 void f3(ref int n = prop)
25 ++n;