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

Structs: Fields check #1907

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Conversation

gzanitti
Copy link
Collaborator

@gzanitti gzanitti commented Oct 15, 2024

Note: Like #1910, this PR also includes the same modifications to expression processing, in order to run tests.

@gzanitti gzanitti mentioned this pull request Oct 15, 2024
@gzanitti gzanitti marked this pull request as ready for review October 15, 2024 03:22
@gzanitti gzanitti changed the title Structs: Field check Structs: Fields check Oct 15, 2024
@chriseth
Copy link
Member

Oh and please also add a test where you mention a field twice.

ast/src/parsed/mod.rs Outdated Show resolved Hide resolved
ast/src/parsed/mod.rs Outdated Show resolved Hide resolved
source: &SourceRef,
) -> Vec<Error> {
let mut errors = Vec::new();
if let (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this panic if it's not a FunctionValueDefinition::TypeDeclaration?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since names comes from StructExpressions, None shouldn't be a possible case, hence the direct unwrap.

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 this pull request may close these issues.

2 participants