June 23, 2013 [Issue 10454] New: Hex string generates an Outside Unicode code space error | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=10454 Summary: Hex string generates an Outside Unicode code space error Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic, rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2013-06-23 13:07:50 PDT --- void main() { enum s = x"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"; pragma(msg, typeof(s)); pragma(msg, s.length); immutable(char)[16] u16 = x"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"; } DMD 2.064alpha gives: string 16u test1.d(5): Error: Outside Unicode code space So 's' is a immutable(char)[] of 16 chars, but that syntax is refused for 'u16'. Additionally the error message is wrong, according to what's written in the D documentation: http://dlang.org/lex.html#HexStringChars >The hex data need not form valid UTF characters.< See also Issue 10453 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation