HaxeFoundation / HaxeFoundation/haxe
"Can only extend structures" typing order issue with `--macro include`
Open
test-needed
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
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`:
```haxe
import B;
typedef A = {}
```
`source/B.hx`:
```haxe
import A;
typedef B = A & {}
typedef C = {
var ?b:B;
}
```
`build.hxml`
```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
Contributor guide
Assessment
This issue has not been assessed yet.