[Issue 12458] New: No out of bounds assert errors in not-release mode for std.bitmanip.BitArray
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 24 15:58:31 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12458
Summary: No out of bounds assert errors in not-release mode for
std.bitmanip.BitArray
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2014-03-24 15:58:27 PDT ---
(This is tagged as error instead of enhancement request.)
This wrong code surprisingly compiles and runs with no errors:
void main() {
import std.bitmanip: BitArray;
BitArray ba;
ba.length = 10;
auto b = ba[100];
}
Built-in D arrays have bound tests, so in not-release mode I'd like BitArray to
give a run-time assert error on code like that. It helps me debug code that
uses BitArrays.
--
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