http://d.puremagic.com/issues/show_bug.cgi?id=10926
Summary: Const problem with ternary operator append
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2013-08-30 04:51:36 PDT ---
void main() {
const(int)[] a, b;
int[] c, d;
(true ? a : b) ~= 10; // OK
pragma(msg, typeof(true ? a : c)); // const(int)[]
(true ? a : c) ~= 20; // line 6, Error: a is not an lvalue
(true ? c : d) ~= 30; // OK
}
DMD 2.064alpha gives:
test.d(6): Error: a is not an lvalue
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------