Skip to content

Spurious [?] circularity error in getter with spreadΒ #48178

@RyanCavanaugh

Description

@RyanCavanaugh

Bug Report

πŸ”Ž Search Terms

circularity getter

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

type Box = {
  content?: Foo | Box
};
declare const b: Box;
class Foo {
  get foo() {
    return {
      content: this as Foo | Box,
      ...b
    };
  }
}

πŸ™ Actual behavior

Circularity error on 'foo' when this is probably deferrable

πŸ™‚ Expected behavior

No circularity error

Ref. #46981

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs InvestigationThis issue needs a team member to investigate its status.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions