Skip to content

Go to implementation misses some implementations #11788

Open
@sandersn

Description

@sandersn

From tests/cases/fourslash/goToImplementationInterfaceMethod_01.ts

interface BaseFoo {
  hello(): void;
}
interface Foo extends BaseFoo {
  foo(): void;
}
interface Bar {
  hello(): void;
  bar(): void;
}
class FooImpl implements Foo {
  hello() { }
  foo() { }
}
class FooBaseImpl implements FooBase {
  hello() { } // missing this one!
}
class BarImpl implements Bar {
  hello() { }
  bar() { }
}
class FooBarImpl implements Foo, Bar {
  hello() { }
  foo() { }
  bar() { }
}
let foorbar: Foo | Bar;
foorbar.hello/*1*/();
let foonbar: Foo & Bar;
foonbar.hello/*2*/();

Find all implementations on both 1 and 2 should find the hello method in all classes. But FooBaseImpl.hello doesn't show up. The test incorrectly says that it should not, but it should.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions