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

bslint doesn't support const #82

Closed
ZeeD opened this issue Nov 29, 2022 · 3 comments · Fixed by #85
Closed

bslint doesn't support const #82

ZeeD opened this issue Nov 29, 2022 · 3 comments · Fixed by #85

Comments

@ZeeD
Copy link

ZeeD commented Nov 29, 2022

brighterscript support the definition of constants but it seems to me that bslint doesn't support them.
with a simple file like

const MYCONST = "..."
sub mysub()
    ? MYCONST
end sub

bslint yields error BSLINT1001: Using uninitialised variable 'MYCONST' when this file is included in scope 'source'.

@taschmidt
Copy link
Contributor

@TwitchBronBron I'm running into this as well. Any issues with doing this?

taschmidt@5eff31f

It seems to fix it for me.

@TwitchBronBron
Copy link
Member

That looks fine to me! Feel free to open a PR with the fix and a unit test verifying the fix, and I'm happy to merge it and cut a release for you!

@taschmidt
Copy link
Contributor

Done #85

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 a pull request may close this issue.

3 participants