-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.
Milestone
Description
-
defer expr, evaluates expr when control flow leaves scope -
%defer expr, evaluates expr when control flow leaves scope by returning an error from the function -
?defer expr, evaluates expr when control flow leaves scope by returning null from the function - defer valid at statement level only in parser
- error when there is a defer with 0 block exit paths
- make the returns respect defer
- error when there is a
%returnin a function with void return type - optimization where the node remembers if it was error wrapped from a payload, if that is returned, then we know it is not an error. when
%returnreturns it is for sure an error. otherwise we have to do a runtime check to find out if it's an error and then do the defer expression - better defer implementation - instead of duplicating the code at every exit path, make a basic block that exit paths point to.
- error for control flow inside an expression exiting the defer expression scope? for example you probably shouldn't be able to
returnin a defer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.