You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Reference BrightScript Implementation allows as object to be used as a type suffix for function arguments and function returns, but it currently causes a parse failure here:
Failing file:
sub Main()
test(invalid)
end subsub test(fooasobject)
print"if you can read this, the bug has been fixed"end subMain()
Failed output:
$ brs ./object-mwe.brs
[Line 5] Function parameter [object Object] is of invalid type 'object'
[Line 7] Found unexpected token 'end sub'
Error occurred
The text was updated successfully, but these errors were encountered:
Looks like there's another bug in reporting that error – [object Object] is a bit of JavaScript object leakage.
sjbarag
added
bug
Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior
parser
Affects this project's token parser
e2e
Affects this project's end-to-end test cases (the BrightScript sample files executed during testing)
and removed
e2e
Affects this project's end-to-end test cases (the BrightScript sample files executed during testing)
labels
Dec 4, 2018
`as object` is basically the same as `as dynamic`, except that `as
object` automatically boxes primitive numbers before passing them into
the function. Since we don't have support for boxed numbers yet, we can
ignore that for now.
closes#102
The Reference BrightScript Implementation allows
as object
to be used as a type suffix for function arguments and function returns, but it currently causes a parse failure here:Failing file:
Failed output:
The text was updated successfully, but these errors were encountered: