Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

No circularity error for self referential get accessor annotations #48031

Copy link
Copy link
@DanielRosenwasser

Description

@DanielRosenwasser
Issue body actions
declare class C {
    // TypeScript correctly reports an error here.
    foo: typeof this.foo;
    // TypeScript does not report an error here.
    get bar(): typeof this.bar;
}

Expected

An error on both foo and bar.

'foo' is referenced directly or indirectly in its own type annotation.
'bar' is referenced directly or indirectly in its own type annotation.

Actual

Just an error on bar.

'bar' is referenced directly or indirectly in its own type annotation.
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptA bug in TypeScriptHelp WantedYou can do thisYou can do this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.