Is my assumption correct that Optional chaining does not work / is not supported? Some examples:
let task: IRunnable | undefined;
task?.Execute() ?? error("No Task found to execute");
compiles to
local task
local ____ = task:Execute() or error("No Task found to execute")
let task: IRunnable | undefined;
task?.Execute();
compiles to
local task
task:Execute()
shouldn't it be something like
local _ = task and task:Execute() or error("No Task found to execute")
if task then task:Execute() else error("No Task found to execute") end
Are there plans to support this?
Is my assumption correct that Optional chaining does not work / is not supported? Some examples:
let task: IRunnable | undefined;
task?.Execute() ?? error("No Task found to execute");
compiles to
local task
local ____ = task:Execute() or error("No Task found to execute")
let task: IRunnable | undefined;
task?.Execute();
compiles to
local task
task:Execute()
shouldn't it be something like
local _ = task and task:Execute() or error("No Task found to execute")
if task then task:Execute() else error("No Task found to execute") end
Are there plans to support this?