-
Notifications
You must be signed in to change notification settings - Fork 43
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
(Interpreter): Functions with return type object
don't auto-box return values
#359
Labels
bug
Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior
e2e
Affects this project's end-to-end test cases (the BrightScript sample files executed during testing)
interpreter
Affects this project's tree-walking interpreter
Comments
sjbarag
added
bug
Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior
e2e
Affects this project's end-to-end test cases (the BrightScript sample files executed during testing)
interpreter
Affects this project's tree-walking interpreter
labels
Jan 21, 2020
sjbarag
added a commit
that referenced
this issue
Jan 21, 2020
…ypes RBI will automatically box an intrinsic value when it's returned from a function that declares an `as object` return type. This makes the function behave quite similarly to an `as dynamic` function, in that it can seemingly return any value. The only difference is that `as dynamic` won't automatically box something like `return false` into an `roBoolean`, while the `as object` variant will! fixes #359
sjbarag
added a commit
that referenced
this issue
Jan 21, 2020
…ypes (#360) RBI will automatically box an intrinsic value when it's returned from a function that declares an `as object` return type. This makes the function behave quite similarly to an `as dynamic` function, in that it can seemingly return any value. The only difference is that `as dynamic` won't automatically box something like `return false` into an `roBoolean`, while the `as object` variant will! fixes #359
sjbarag
added a commit
that referenced
this issue
Jan 27, 2020
Just like with #359 , function parameters must *also* get automatically boxed.
sjbarag
added a commit
that referenced
this issue
Jan 27, 2020
Just like with #359 , function parameters must *also* get automatically boxed.
lvcabral
referenced
this issue
in lvcabral/brs-engine
Mar 11, 2020
…ypes (#360) RBI will automatically box an intrinsic value when it's returned from a function that declares an `as object` return type. This makes the function behave quite similarly to an `as dynamic` function, in that it can seemingly return any value. The only difference is that `as dynamic` won't automatically box something like `return false` into an `roBoolean`, while the `as object` variant will! fixes #359
lvcabral
added a commit
to lvcabral/brs-engine
that referenced
this issue
Mar 11, 2020
Just like with sjbarag/brs#359 , function parameters must *also* get automatically boxed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior
e2e
Affects this project's end-to-end test cases (the BrightScript sample files executed during testing)
interpreter
Affects this project's tree-walking interpreter
RBI allows functions to declare a return type of
object
that return a value of any primitive type, and automatically boxes those primitive types to their object-like versions. Effectively all return types are thus allowed fromas object
functions, just like withas dynamic
(or not declaring a return type). The only difference is thatas dynamic
(or not declaring a return type) doesn't automatically box return values.Current behavior during execution:
The text was updated successfully, but these errors were encountered: