[Issue 10033] New: Wrong example in chapter Vector Extensions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 5 11:23:51 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10033
Summary: Wrong example in chapter Vector Extensions
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: websites
AssignedTo: nobody at puremagic.com
ReportedBy: kai at redstar.de
--- Comment #0 from kai at redstar.de 2013-05-05 11:23:50 PDT ---
In the Language Reference, chapter Vector Extensions, section Accessing
Individual Vector Elements:
The 3rd example
cast(int[4])v[3] = 2;
does not compile. You have to add parenthesis to compile:
(cast(int[4])v)[3] = 2;
(According to TDPL, [] has a higher precedence then cast(). The compile error
is therefore correct.)
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list