Summary: Explicitly instantiated templates still try to do IFTI
                    in some cases
           Product: D
           Version: 2.037
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD

--- Comment #0 from Steven Schveighoffer <> 2010-05-10 
14:17:02 PDT ---
I'm unsure if this is a minimal case:

interface I(T)
    T foo();

interface I2(T, U)
    T foo();
    U bar();

void fn(T)(I!T t1) { }

void fn(T, U)(I2!(T, U) t1) { }

class C : I!int
    int foo() { return 5;}

void main()
    auto c = new C;
    I!int i = c;
    fn!(int)(i); // compiles
    fn!(int)(c); // fails


testtemplate.d(26): Error: template testtemplate.fn(T) does not match any
function template declaration
testtemplate.d(26): Error: template testtemplate.fn(T) cannot deduce template
function from argument types !(int)(C)
testtemplate.d(26): Error: template instance errors instantiating template

This compiled with 2.036.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to