1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail9891.d(13): Error: cast(int)i is not an lvalue
5 fail_compilation/fail9891.d(18): Error: cast(int)i is not an lvalue
6 fail_compilation/fail9891.d(23): Error: prop() is not an lvalue
7 ---
8 */
9 
10 immutable int i;
prop()11 int prop() { return 0; }
12 
13 void f1(ref int n = i)
14 {
15     ++n;
16 }
17 
18 void f2(out int n = i)
19 {
20     ++n;
21 }
22 
23 void f3(ref int n = prop)
24 {
25     ++n;
26 }
27