stringof giving a surprising output

Manu turkeyman at gmail.com
Tue May 15 00:39:21 PDT 2012


Nobody?
Is this intentional, or a bug? Some way that this makes sense that I don't
understand?
Does Colour somehow transfer its scope to the default arg? That string
doesn't seem to compile...

On 14 May 2012 15:52, Manu <turkeyman at gmail.com> wrote:

> void function(Colour c = Colour.white) f;
>
> f.stringof == "void function(Colour c = white)"
>
> Error: undefined identifier 'white'
>
>
> This is rather hard to work-around. It'll take a lot of time to write code
> to magically put 'Colour.' back there...
> Is there another way?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120515/6848a57a/attachment.html>


More information about the Digitalmars-d mailing list