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


Kenji Hara <k.hara...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from Kenji Hara <k.hara...@gmail.com> 2012-09-20 18:18:33 PDT ---
(In reply to comment #0)
> Is this supposed to work? If the answer is negative, maybe it's a good idea to
> support this:
> 
> struct Foo(T) {}
> void bar(Spam, T)(Spam!T y) {}
> void main() {
>     Foo!int x;
>     bar(x);
> }

Compiler would infer Spam as a template symbol in IFTI, but it is
TemplateTypeParameter. Therefore this doesn't work.

Correct code is here:

struct Foo(T) {}
void bar(alias Spam, T)(Spam!T y) {}
void main() {
    Foo!int x;
    bar(x);
}

You can receive deduced template symbol by TemplateAliasParamerter. Then all
works.

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

Reply via email to