Skip to content

PrivateName does not permit escape characters #50851

@DanielRosenwasser

Description

@DanielRosenwasser

Discovered by @amcasey while running TS on test262.

export class IdentifierNameWithEscape {
    \u{78}: number;

    constructor() {
        this.\u{78} = 0;
    }

    doThing() {
        this.x = 42;
    }
}

export class PrivateIdentifierWithEscape {
    #\u{78}: number;

    constructor() {
        this.#\u{78} = 0;
    }

    doThing() {
        this.#x = 42;
    }
}

Currently IdentifierNameWithEscape parses and type-checks correctly; however, PrivateIdentifierWithEscape does not even parse.

Metadata

Metadata

Labels

BugA bug in TypeScriptEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Fix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions