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



--- Comment #7 from Piotr Szturmaj <gacek...@tlen.pl> 2010-12-21 04:47:38 PST 
---
This is why I filled this bug report. I think it introduces a confusion,
Jonathan also got caught on that.

Consider following code:

mixin template Test(string s)
{
    static string str = s;
    //struct s { }
}

mixin Test!("text");

it compiles flawlessly. Now uncomment line with struct:

mixin template Test(string s)
{
    static string str = s;
    struct s { }
}

mixin Test!("text");

This time compiler fails with:
Error: cannot implicitly convert expression (s) of type s to string

Now it is impossible to refer to value parameter s. I think there should be at
least a warning which informs user that template declarations are hiding
template parameters.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to