Skip to content

Better error messages when outer 'this' has the right type #26461

Closed

Description

From Andy (Andrewkraft) (@Andy-MS) at #26447

we should also have a good error message in the following situation:

class C {
    m() {
        this.m();
        function f() {
            this.m();
        }
    }
}

This is a common error and it's not obvious why this works in one place but not the other. The error message should indicate the place where this was shadowed.

Metadata

Metadata

Labels

Domain: Error MessagesExperience EnhancementFixed

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions