You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the macro API documentation here, the EReturn ExprDef is stated as having an Expr parameter, but it accepts null, and with a null parameter it becomes a plain return; statement. In other cases of ExprDef, where behavior is different when passing a null parameter, the documentation shows the parameter typed as Null so it should be for EReturn as well. I checked the ExprDef source and found that in the code the type is correct as of two years ago, so the documentation must be out of date.
The text was updated successfully, but these errors were encountered:
The API doc pages all say that they're generated for 4.1.3, and looking at the 4.1.3 source for ExprDef I see that EReturn is different from the other types with optional params.
EReturn(?e:Null<Expr>);
vs. ESwitch(e:Expr, cases:Array<Case>, edef:Null<Expr>); EIf(econd:Expr, eif:Expr, eelse:Null<Expr>);
As of 4.1.3, EReturn's param is declared with both ? and Null<>. Maybe that caused the problem. On development, it changed to just ? but EIf and ESwitch are still using Null<>. Maybe dox hides ? declarations?
In the macro API documentation here, the EReturn ExprDef is stated as having an Expr parameter, but it accepts null, and with a null parameter it becomes a plain
return;
statement. In other cases of ExprDef, where behavior is different when passing a null parameter, the documentation shows the parameter typed as Null so it should be for EReturn as well. I checked the ExprDef source and found that in the code the type is correct as of two years ago, so the documentation must be out of date.The text was updated successfully, but these errors were encountered: