HaxeFoundation / HaxeFoundation/haxe
try catch over haxe.macro.* doc "wrong"
Open
documentation
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
`Context.getType` throws an error that can not be catched
`Module haxe.Constraints does not define type Constraints`
It it here?
https://github.com/HaxeFoundation/haxe/blob/a4fad7bdf61558547232b8b12d3a2aefbb79b60a/src/typing/typeload.ml#L94
```haxe
class Macro {
#if macro
public static function build() {
try {
haxe.macro.Context.getType('haxe.Constraints');
} catch(e:String) {}
return null;
}
#end
public static macro function test() {
try {
haxe.macro.Context.getType('haxe.Constraints');
} catch(e:String) {}
return macro {};
}
}
```
http://try-haxe.mrcdk.com/#cB1d0
Contributor guide
Assessment
This issue has not been assessed yet.