rokucommunity / brighterscript

A superset of Roku's BrightScript language
MIT License
159 stars 46 forks source link

Added ArrayDefaultTypeReferenceType for when array symbol is not defined yet #1111

Closed markwpearce closed 6 months ago

markwpearce commented 6 months ago

Needed to add a whole new ReferenceType for this use case!

Because the for-each-loop target was defined on a namespace, it wasn't defined yet at File-validation time (Namespaces are only defined at scope linking), so the default type was unknown.

Now that we have a reference type for this particular case, the array symbol can be defined in the future, and the for-each item will be automatically known.

image