Skip to content

Incorrect error for parameter properties references #26719

@sandersn

Description

@sandersn
class Foo {
    constructor(public x = 12, public y = x.toFixed()) {}
}

Expected behavior:
No error.

Actual behavior:
Can't find name 'x' in the expression 'x.toFixed()'.

Caused by #26317, so the fix should be an easy modification to that new code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions