sjbarag / brs

An interpreter for the BrightScript language that runs on non-Roku platforms.
MIT License
113 stars 43 forks source link

fix(stdlib): callFunc inheritance has correct environment #557

Closed lkipke closed 4 years ago

lkipke commented 4 years ago

Change Summary

Yet another bug fix for callFunc! Hopefully this is the last of them.

Instead of traversing through the inheritance tree at runtime, we're now correctly seeding the inherited functions in the component definitions at parse time. This is a tiny little bit better for performance, but mainly it fixes an issue where an inherited callFunc would be "stuck" in a parent's environment and unable to use any of the child's functions (which is not how it works on Roku).