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

Fix issue #105 do not override the original incomplete array type siz… #106

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tstreiff
Copy link
Contributor

@tstreiff tstreiff commented Jul 7, 2020

…e when it is completed by an initializer for a variable. Ensure that an array type is complete at the end of an array variable declaration.

…rray type size when it is completed by an initializer for a variable. Ensure that an array type is complete at the end of an array variable declaration.
@tstreiff
Copy link
Contributor Author

tstreiff commented Jul 7, 2020

Oups... the PR fixes the issue but brings a big regression.
When the type of the array is complete, patch_size_from_initializer() returns no type and the variable ends with a None type.
I made a 2nd attempt and the regression is fixed.
My commit 6221ee8 is the 2nd version.

Not sure what I can do now.

typ.element_type,
len(initializer.values)
)
initializer.typ = new_type
Copy link
Owner

Choose a reason for hiding this comment

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

I think we should not modify the type of the initializer here, right? It should already be good.

@windelbouwman
Copy link
Owner

windelbouwman commented Jul 10, 2020

Oups... the PR fixes the issue but brings a big regression.
When the type of the array is complete, patch_size_from_initializer() returns no type and the variable ends with a None type.
I made a 2nd attempt and the regression is fixed.
My commit 6221ee8 is the 2nd version.

Not sure what I can do now.

I think this change is in real good shape! One thing to top it off is to run the black code formatter, and add the excellent failing test example from issue #105 as a test case.

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.

None yet

2 participants