Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic on embedding non-defined interface at getEmbeddedInterfaceDefiningMethod #211

Closed
mcfog opened this issue May 14, 2022 · 0 comments · Fixed by #213
Closed

panic on embedding non-defined interface at getEmbeddedInterfaceDefiningMethod #211

mcfog opened this issue May 14, 2022 · 0 comments · Fixed by #213

Comments

@mcfog
Copy link

mcfog commented May 14, 2022

errcheck panics on following source file

package main

func main() {
	t := A(T{})
	t.X()
}

type T struct{}

func (t T) X() {}

type A interface {
	B // embeded
}

type B = interface { // B is not a defined type
	X()
}

embedded := interfaceT.Embedded(i) would be nil and panics on next line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant