Summary: IFTI on non-function templates
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid, wrong-code
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-06-30 07:53:44 PDT ---
DMD 2.059:
template X(){
    double X(double){return 2;}
    float X(float){return 3;}
static assert(!is(typeof(X(2))));               // fail
static assert(is(typeof(X!()(2.0f)) == float)); // fail
static assert(is(typeof(X(2.0))==double));      // ok
static assert(is(typeof(X(2.0f))==float));      // fail

All static assertions should pass.

IFTI should not have any other effect than implicit template instantiation if
template in question contains more than one declaration.

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

Reply via email to