-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Built in Brightscript functions that are as void do not return invalid like developer created functions.
When you call built-in as void functions that are on the native roku objects, they return uninitialized. When you call developer-written as void functions, they return invalid.
So the runtime behavior is different even though you'd expect as void to behave the same regardless of where they're defined.
And since uninitialized causes runtime crashes when you try to read them and have slightly different rules than invalid, it's important to know when you're using uninitialized vs invalid.
To fix in V1 -- we could just make the doc scraper build a correct TypedFunctionType that returns UninitializedType when the return is as void
And then validate against uninitialized RHS of assignment statements.