https://d.puremagic.com/issues/show_bug.cgi?id=12477
Summary: std.bitmanip should emit informative diagnostics
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2014-03-26
23:50:07 CET ---
-----
import std.bitmanip;
struct S
{
mixin(bitfields!(
uint, "a", 6,
uint, "b", 10));
}
void main()
{
S s;
s.a = uint.max;
}
-----
$ dmd -g -run test.d
-----
[email protected](8): Assertion failure
----------------
0x0040240B in _d_assert
0x0040217D in _Dmain at C:\dev\code\d_code\test.d(15)
0x00402704 in D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv
0x004026D7 in void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).runAll()
0x004025F0 in _d_run_main
0x00402198 in main
0x004189DD in mainCRTStartup
0x75803677 in BaseThreadInitThunk
0x778A9D72 in __RtlUserThreadStart
0x778A9D45 in _RtlUserThreadStart
-----
The number is out of range for the bitfield size, but the diagnostic doesn't
say that.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------