[Issue 1351] Discrepancies in the language specification

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 31 00:23:19 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1351





------- Comment #7 from aziz.kerim at gmail.com  2007-07-31 02:23 -------
(In reply to comment #5)
> (In reply to comment #4)
> > "[...]
> > Otherwise, it resolves to the type with the smallest size it will fit into."
> > 
> > Which type does a character literal with an HTML entity have (e.g. '\&xyz;')?
> 
> The last sentence you've quoted makes it seem clear to me.

It actually does, but I think HTML entities have to be explicitly mentioned as
well. Because:
auto foo = '\&';
pragma(msg, typeof(foo).stringof); // prints dchar instead of char (which an
ampersand should fit into)

> If c is a uint, then c is a uint.  But what you seem to mean by it seems right
> to me.
Yes, what I mean is that c contains a decoded Unicode character and the if
statements are there to determine the type of the character literal.


-- 



More information about the Digitalmars-d-bugs mailing list