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

bug(gnovm): Non-alias Type Assignments Should Fail #2787

Open
deelawn opened this issue Sep 12, 2024 · 0 comments
Open

bug(gnovm): Non-alias Type Assignments Should Fail #2787

deelawn opened this issue Sep 12, 2024 · 0 comments
Assignees

Comments

@deelawn
Copy link
Contributor

deelawn commented Sep 12, 2024

Description

Any of these assignments should fail:

package main

type MyInt int

func main() {
	_ = MyInt
	_ = &MyInt
	a := MyInt
	b := &MyInt
}

The only time an assignment to a type should be permitted is when doing a type alias, something like:

package main

type MyInt int
type MyOtherInt = MyInt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

No branches or pull requests

1 participant