digitalmars.D.bugs - [Issue 8593] New: CT out of bounds checks sometimes skipped
- d-bugmail puremagic.com (36/36) Aug 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8593
- d-bugmail puremagic.com (16/16) Aug 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8593
http://d.puremagic.com/issues/show_bug.cgi?id=8593 Summary: CT out of bounds checks sometimes skipped Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: andrej.mitrovich gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2012-08-27 08:11:09 PDT --- This compiles but it should give a CT error since x[4] is out of bounds: import std.typetuple; void main() { alias TypeTuple!(int) x; static if (is(x[4] == int)) { } } This correctly gives the error message, 'int' and 'x[4]' just swapped places: import std.typetuple; void main() { alias TypeTuple!(int) x; static if (is(int == x[4])) { } } test.d(17): Error: tuple index 4 exceeds 1 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 27 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8593 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2012-08-27 08:19:24 PDT --- Timon Gehr: Actually it is according to the specification: "3. is ( Type == TypeSpecialization ) The condition is satisfied if Type is semantically correct and is the same type as TypeSpecialization." => TypeSpecialization is compiled without suppressing errors. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 27 2012