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

           Summary: Using template struct parameters in method definition
                    fails with "parameter _param_0 is already defined"
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: osa8...@gmail.com


--- Comment #0 from osa8...@gmail.com 2010-09-17 16:15:29 PDT ---
I'm trying to define a struct template where template parameters are used to
define struct methods:
----
struct A( T... ) {
    void foo( T ) {}
    void bar( bool, T ) {}
}

void main() {
    auto a = A!( int )();
}
----

This fails to compile (dmd 2.049), producing the following errors:

a.d(3): Error: function a.A!(int).A.bar parameter bar._param_0 is already
defined
a.d(7): Error: template instance a.A!(int) error instantiating

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

Reply via email to