[Issue 3150] New: cast from dynamic array to ulong is allowed
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 7 12:16:53 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3150
Summary: cast from dynamic array to ulong is allowed
Product: D
Version: 1.045
Platform: Other
OS/Version: Linux
Status: NEW
Keywords: spec
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: kamm-removethis at incasoftware.de
This compiles and seems to set u to foo.length.
void main() {
void[] foo = "abc";
ulong u = cast(ulong)foo;
}
The cast is an error for any other numeric type. I think it ought to be an
error - if it is desired, it should at least be documented.
--
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