[Issue 11993] New: [REG][2.065] typeof(this) in template constraints wrong qualifiers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 25 08:32:48 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11993

           Summary: [REG][2.065] typeof(this) in template constraints
                    wrong qualifiers
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: monarchdodra at gmail.com


--- Comment #0 from monarchdodra at gmail.com 2014-01-25 08:32:44 PST ---
This *just* broke on master:

//----
bool fun(T)()
{
    pragma(msg, T.stringof);
    return true;
}

struct S
{
    void foo()() const
    if (fun!(typeof(this)))
    {}
}

void main()
{
    S s;
    s.foo();
}
//----
master: "S"
2.064.2: "const(S)"


Here, "foo" is const, so in the template constraint, "this" should be
"const(S)". Yet when querying "fun", it prints "S".

This regression is responsible for the failures here:
https://d.puremagic.com/test-results/pull-history.ghtml?projectid=1&repoid=3&pullid=1049

My guess is there is a DMD pull around between 2014-01-23T21:00 and
2014-01-24T21:00 that broke it.

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


More information about the Digitalmars-d-bugs mailing list