Summary: [2.059 beta] IFTI with inout does not properly match
                    template parameter if called from inout function for
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD

--- Comment #0 from Steven Schveighoffer <> 2012-04-09 
08:58:18 PDT ---
This worked in 2.058:

inout(T) * foo(T)(inout(T)* t)
    static assert(is(T == int *));
    return t;

inout(T)* bar(T)(inout(T)* t)
    return foo(t);

void main()
    int *i;

It fails the assert in the 2.059 beta.

It seems to only happen if 'i' is a pointer, and only if foo is called with an
inout variable from an inout function.

Note that the function still compiles ( with typeof(t) == inout(int *)* ), it's
just that the T is not properly extracted using IFTI.  This has consequences if
you use T to create another template.

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

Reply via email to