4 fail_compilation/b20011.d(28): Error: cannot modify expression `S1(cast(ubyte)0u).member` because it is not an lvalue
5 fail_compilation/b20011.d(31): Error: cannot modify expression `S2(null).member` because it is not an lvalue
6 fail_compilation/b20011.d(32): Error: cannot modify expression `S2(null).member` because it is not an lvalue
7 fail_compilation/b20011.d(35): Error: cannot modify expression `U1(cast(ubyte)0u, ).m2` because it is not an lvalue
8 fail_compilation/b20011.d(40): Error: function `assignableByRef` is not callable using argument types `(ubyte)`
9 fail_compilation/b20011.d(40): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `ref ubyte p`
10 fail_compilation/b20011.d(37): `b20011.main.assignableByRef(ref ubyte p)` declared here
11 fail_compilation/b20011.d(41): Error: function `assignableByOut` is not callable using argument types `(ubyte)`
12 fail_compilation/b20011.d(41): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `out ubyte p`
13 fail_compilation/b20011.d(38): `b20011.main.assignableByOut(out ubyte p)` declared here
14 fail_compilation/b20011.d(42): Error: function `assignableByConstRef` is not callable using argument types `(ubyte)`
15 fail_compilation/b20011.d(42): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `ref const(ubyte) p`
16 fail_compilation/b20011.d(39): `b20011.main.assignableByConstRef(ref const(ubyte) p)` declared here
21 struct S1
{ ubyte member
; }
22 struct S2
{ ubyte[] member
; }
23 union U1
{ ubyte m1
; int m2
; }
34 enum U1 u1
= {m1
: 0};
37 void assignableByRef(ref ubyte p
){ p
= 42; }
38 void assignableByOut(out ubyte p
){ p
= 42; }
39 void assignableByConstRef(ref const ubyte p
){}
40 assignableByRef(s1
.member
);
41 assignableByOut(s1
.member
);
42 assignableByConstRef(s1
.member
);