[Issue 9572] Missed wrong implicit integral conversion

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 23 04:56:40 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=9572



--- Comment #3 from bearophile_hugs at eml.cc 2013-11-23 04:56:35 PST ---
void main() {
    int[300] data;
    foreach (ubyte i, x; data) {} // Line 3, no error.
    ubyte j = data.length; // Line 4, Error.
}



Now the error messages are correct (but there is an extra newline in the
middle):

temp.d(3): Error: index type 'ubyte' cannot cover index range 0..300

temp.d(4): Error: cannot implicitly convert expression (300u) of type uint to
ubyte

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list