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

Using optional chaining with the boxed version of invalid causes a runtime error #88

Open
gregomite opened this issue Jan 30, 2025 · 0 comments

Comments

@gregomite
Copy link

From Roku's documentation, the invalid value and its boxed version, CreateObject("roInvalid") are both treated as invalid; however, no other values are. See Optional Chaining docs.

brs> foo = CreateObject("roInvalid")
brs> ?foo
<Component: roInvalid>
brs> print foo?.bar
REPL(1,11-14): Member function not found in BrightScript Component or interface.
brs>

The expression print foo?.bar should print out invalid instead of the error, "Member function not found in BrightScript Component or interface.".

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

No branches or pull requests

1 participant