haxe
haxe copied to clipboard
"Can only extend structures" typing order issue with `--macro include`
This is what I got when isolating the weird OS-dependent language-server-protocol-haxe CI failure I was debugging with @nadako yesterday.
source/A.hx:
import B;
typedef A = {}
source/B.hx:
import A;
typedef B = A & {}
typedef C = {
var ?b:B;
}
build.hxml
-cp source
--macro include("", true, null, ["source"])
>haxe build.hxml
source/B.hx:3: characters 13-19 : Can only extend structures
Some very strange effects here:
- doesn't reproduce if the
?is removed fromtypedef C(?!) - if
Ais renamed toBandBtoA, it also doesn't reproduce
Note: this is probably related to, or maybe even the same issue as the display issue in https://github.com/HaxeFoundation/haxe/issues/7937.
Cannot reproduce with the latest dev Haxe
Still reproduces for me. As mentioned, this seems to be OS-dependent or something.
Maybe you want to reopen https://github.com/HaxeFoundation/haxe/issues/7937 too
Way ahead of you. :D