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

nil value interface bug #3758

Open
petar-dambovaliev opened this issue Feb 15, 2025 · 0 comments
Open

nil value interface bug #3758

petar-dambovaliev opened this issue Feb 15, 2025 · 0 comments
Assignees
Labels
🐞 bug Something isn't working 📦 🤖 gnovm Issues or PRs gnovm related

Comments

@petar-dambovaliev
Copy link
Contributor

Gnovm panics on this valid code

package main

type Writer interface {
	Write([]byte) (int, error)
}

type Stringer interface {
	String() string
}

func main() {
	var x interface {
		Writer
		Stringer
	}
	var w Writer = Writer(x) // explicit conversion
	println(w)
}

Expected to see
(0x0,0x0)

Got

Machine.RunMain() panic: interface method call on undefined value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Development

No branches or pull requests

1 participant