HaxeFoundation / HaxeFoundation/haxe

Haxe has difficulty with `Type.typeof` in macro context

Open
#12,525 16 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

```bash
ERROR] (unknown position)

| [0] Type not found: haxe.macro.Ref
```

[source](https://github.com/0b1kn00b/macro_type_lookup) includes `Dockerfile` and build instructions.

`fold_tree` uses `Type.typeof` at each step. [here](https://codeberg.org/ohmrun/stx_data_blob/src/commit/ba5b2d581c8fdbae06ed2949c20a9f0730ea70a5/src/main/haxe/stx/data/blob/Blob.hx#L161)

Image

Contributor guide

Open the contributing guide

Research direction

Start with the Dockerfile and build instructions in the linked macro_type_lookup reproduction, then inspect the fold_tree call to Type.typeof in Blob.hx. Reproduce the macro-context error and trace why haxe.macro.Ref is not found; done means the reproduction builds without this error and the relevant macro behavior is covered.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.