[Issue 4510] New: accepts-invalid: ref with a wrong type specifier is accepted
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 26 12:02:02 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4510
Summary: accepts-invalid: ref with a wrong type specifier is
accepted
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2010-07-26 12:02:01 PDT ---
Taken from TDPL, the following test-case shouldn't compile:
void main() {
float[] arr = [1.0, 2.5, 4.0];
foreach (ref double elem; arr) {
elem /= 2;
}
}
--
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