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

anonymous struct embedding lacks checks #21876

Closed
Delta456 opened this issue Jul 15, 2024 · 0 comments · Fixed by #21877
Closed

anonymous struct embedding lacks checks #21876

Delta456 opened this issue Jul 15, 2024 · 0 comments · Fixed by #21877
Assignees
Labels
Unit: Checker Bugs/feature requests, that are related to the type checker. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general.

Comments

@Delta456
Copy link
Member

Delta456 commented Jul 15, 2024

The following code lacks check and compiles successfully.

type Int = int
type MyIndex = struct {
	Int Int
}
type Int = int
type MyIndex = struct {
	Int
}

These programs must be a checker error because the parent type is not a structure.

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@Delta456 Delta456 added Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Unit: Checker Bugs/feature requests, that are related to the type checker. labels Jul 15, 2024
@Delta456 Delta456 self-assigned this Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unit: Checker Bugs/feature requests, that are related to the type checker. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant