August 30, 2013 [Issue 10926] New: Const problem with ternary operator append | ||||
---|---|---|---|---|
| ||||
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: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 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: ------- |
August 30, 2013 [Issue 10926] Const problem with ternary operator append | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=10926 --- Comment #1 from bearophile_hugs@eml.cc 2013-08-30 07:49:31 PDT --- See also Issue 10315 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation