windelbouwman / ppci

A compiler for ARM, X86, MSP430, xtensa and more implemented in pure Python
https://ppci.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
337 stars 36 forks source link

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

Open tstreiff opened 4 years ago

tstreiff commented 4 years ago

…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.

tstreiff commented 4 years ago

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.

windelbouwman commented 4 years ago

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.