HaxeFoundation / HaxeFoundation/dox
[docs] haxe.macro.ExprDef EReturn(Expr) should be EReturn(Null<Expr>)
- Dominant language
- Haxe
- Stars
- 158
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
In the macro API documentation [here](https://api.haxe.org/haxe/macro/ExprDef.html#EReturn), 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](https://github.com/HaxeFoundation/haxe/blame/c7d2c7aac5f8d280d694e46fc1c9de52e218b9c6/std/haxe/macro/Expr.hx#L506), so the documentation must be out of date.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.