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

Missing diagnostics for use of variables from parent function bodies #1331

Open
TwitchBronBron opened this issue Oct 18, 2024 · 0 comments
Open
Labels
bug Something isn't working
Milestone

Comments

@TwitchBronBron
Copy link
Member

BrightScript does not support closures, so we need to properly warn when referencing outer variables from inner functions.

In v1.0.0-alpha.39 there is no diagnostic for referencing outer in this example, but there should be.

Image

function test(outer = 1)
    test2 = function(inner = 2)
        print outer + inner
    end function
end function
@TwitchBronBron TwitchBronBron added the bug Something isn't working label Oct 18, 2024
@TwitchBronBron TwitchBronBron added this to the v1.0.0 milestone Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant