Skip to content

[REG 2.063] IFTI doesn't work with TemplateThisParameter and inheritance #18981

Description

@dlangBugzillaToGithub

Vladimir Panteleev (@CyberShadow) reported this on 2015-04-23T23:06:02Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=14484

CC List

Description

Maybe I don't understand what TemplateThisParameter is for, but I'd think this should work:

/////////// test.d //////////
class A
{
    final void f(this This)()
    {
        pragma(msg, This);
    }
}

class B : A
{
    final void x()
    {
        f();
    }
}
/////////////////////////////

I would expect f to be instantiated with This==B.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions