September 20, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11074

           Summary: Template value parameter defaults behave differently
                    for IFTI and normal instantations
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: simen.kjaras@gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras@gmail.com> 2013-09-20 08:33:21 PDT ---
void bar(int line = __LINE__)() {
    pragma(msg, line);
}

void main() {
    bar!()();
    bar();
}

The two calls to bar should be equivalent, right? They're not. In the case of explicit instantiation, __LINE__ is evaluated to be 1, while with IFTI, it is 7.

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