[Issue 2367] Overloading error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 20 13:44:12 PDT 2008


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





------- Comment #1 from jarrett.billingsley at gmail.com  2008-09-20 15:44 -------
"string literals" do not have a type; they are, in some ways,
polysemous.  They are considered char[], wchar[], or dchar[] based on
where they're used.  If they're used in a situation where it could go
either way (such as this overloading case), it's an error.

The solution is simple: affix a 'c', 'w', or 'd' to the end of the
string literal to give it an explicit type.


-- 



More information about the Digitalmars-d-bugs mailing list