[Issue 12480] New: static assert should print out the string representation of a value it can interpret
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 27 04:44:07 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12480
Summary: static assert should print out the string
representation of a value it can interpret
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
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> 2014-03-27 12:44:04 CET ---
-----
enum chars = ["oops", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A",
"A#", "B"];
static assert(chars.length == 12);
-----
$ dmd test.d
> Error: static assert (13u == 12u) is false
-----
static immutable chars = ["oops", "C", "C#", "D", "D#", "E", "F", "F#", "G",
"G#", "A", "A#", "B"];
static assert(chars.length == 12);
-----
$ dmd test.d
> Error: static assert (chars.length == 12u) is false
--
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