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

When resolving custom types, recurse into Arrays to be sure the element type is resolved. #1522

Merged
merged 1 commit into from
May 11, 2022

Conversation

otrho
Copy link
Contributor

@otrho otrho commented May 11, 2022

Closes #1501.

@otrho otrho added bug Something isn't working P: critical Should be looked at before anything else labels May 11, 2022
@otrho otrho self-assigned this May 11, 2022
Comment on lines -232 to -234
if a_count == b_count {
let (new_warnings, new_errors) =
self.unify(a_elem, b_elem, span, help_text.clone());
Copy link
Contributor Author

@otrho otrho May 11, 2022

Choose a reason for hiding this comment

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

This isn't a part of the fix, but I noticed that it's checking if a_count == b_count but this arm won't even match unless that is so due to line 229 so this is all redundant.

@otrho otrho added the compiler General compiler. Should eventually become more specific as the issue is triaged label May 11, 2022
Copy link
Contributor

@mohammadfawaz mohammadfawaz left a comment

Choose a reason for hiding this comment

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

Presumably we should be able to have any combination of arrays and structs now (e.g. arrays of structs that contain other arrays etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler General compiler. Should eventually become more specific as the issue is triaged P: critical Should be looked at before anything else
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Using a custom type in an array triggers an Internal Compiler Error
3 participants