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

BrightScript allows to reassign m in the function level #82

Open
lvcabral opened this issue Dec 10, 2024 · 0 comments
Open

BrightScript allows to reassign m in the function level #82

lvcabral opened this issue Dec 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@lvcabral
Copy link
Collaborator

lvcabral commented Dec 10, 2024

Runninng the code below:

sub main()
   m.foo = "bar"
   print m.foo
   changeM()
   print m.foo
end sub

sub changeM()
   m = 1
   print m + 1
end sub

in Roku prints

bar
 2
bar

in brs generates an exception

bar
/test-m-object.brs(10,9-10): Type Mismatch. Operator "+" can't be applied to "Object" and "Integer".
@lvcabral lvcabral added the bug Something isn't working label Dec 10, 2024
@lvcabral lvcabral self-assigned this Dec 10, 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