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 reassignment of m object in the function level #416

Closed
lvcabral opened this issue Dec 10, 2024 · 0 comments · Fixed by #417
Closed

BrightScript allows reassignment of m object in the function level #416

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

Comments

@lvcabral
Copy link
Owner

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

Successfully merging a pull request may close this issue.

1 participant