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

interface convertible bug (2): nil underlying #1198

Closed
xushiwei opened this issue May 19, 2022 · 0 comments
Closed

interface convertible bug (2): nil underlying #1198

xushiwei opened this issue May 19, 2022 · 0 comments
Labels
Milestone

Comments

@xushiwei
Copy link
Member

The following program sample.gop triggers an unexpected result

import "runtime"

type Outer interface{ Inner }

type impl struct{}

func New() Outer { return &impl{} }

type Inner interface {
	DoStuff() error
}

func (a *impl) DoStuff() error {
	return nil
}

func main() {
	var outer Outer = New()
}

Expected result

compile passed

Got

nil underlying

Gop Version

gop v1.1.0-alpha1-256-gf3285c6 darwin/amd64

Additional Notes

No response

@xushiwei xushiwei added this to the Go+ v1.1 milestone May 19, 2022
@xushiwei xushiwei added the bug label May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant