Skip to content

Cross-repo Find implementations does not work when interface is defined downstream of type #64

@varungandhi-src

Description

@varungandhi-src

There was a code example shared here:

type Foo interface {
	Bar()
}

https://demo.sourcegraph.com/github.com/simoncwaterer/example1code/-/blob/example1.go?L5:6-5:9#tab=implementations_go

The example1code repo depends on example2code which has a type which conforms to this interface:
https://demo.sourcegraph.com/github.com/simoncwaterer/example2code/-/blob/ex/ex.go

type T struct{}

func (t *T) Bar() {
	fmt.Println("Bar")
}

So the interface is defined "downstream" of the type. In this case, Find implementations on the interface does not give T as one of the results.

CleanShot 2023-10-30 at 17 41 55@2x

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions