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

           Summary: Template argument deduction does not work with static
                    methods of shared class
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Robert Luger <[email protected]> 2013-03-12 12:04:37 
PDT ---
When passing arguments to a static shared template method, DMD is unable to
deduce types. Code:

import std.stdio;
shared class test {
    static void sharedTemplate(T)(T arg){
        writeln(arg);
    }
}
void main(){
    test.sharedTemplate(5);
}

Produces:

src\main.d(10): Error: template main.test.sharedTemplate does not match any
function template declaration. Candidates are:
src\main.d(4):        main.test.sharedTemplate(T)(T arg)
src\main.d(10): Error: template main.test.sharedTemplate(T)(T arg) cannot
deduce template function from argument types !()(int)

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

Reply via email to