haxe icon indicating copy to clipboard operation
haxe copied to clipboard

"Can only extend structures" typing order issue with `--macro include`

Open Gama11 opened this issue 6 years ago • 5 comments

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 from typedef C (?!)
  • if A is renamed to B and B to A, it also doesn't reproduce

Gama11 avatar Apr 17 '19 19:04 Gama11

Note: this is probably related to, or maybe even the same issue as the display issue in https://github.com/HaxeFoundation/haxe/issues/7937.

Gama11 avatar Apr 17 '19 19:04 Gama11

Cannot reproduce with the latest dev Haxe

RealyUniqueName avatar Jul 11 '19 09:07 RealyUniqueName

Still reproduces for me. As mentioned, this seems to be OS-dependent or something.

Gama11 avatar Jul 11 '19 09:07 Gama11

Maybe you want to reopen https://github.com/HaxeFoundation/haxe/issues/7937 too

RealyUniqueName avatar Jul 11 '19 09:07 RealyUniqueName

Way ahead of you. :D

Gama11 avatar Jul 11 '19 09:07 Gama11