HaxeFoundation / HaxeFoundation/haxe

"Module X does not define type" error when using wildcard

Open
#12,014 6 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

https://try.haxe.org/#f0F1dcFd

```haxe
/* Tools.hx */
class Tools {
public static function doSomething() {}
}
```

```haxe
/* Main.hx */
// import haxe.macro.Tools; // <- no error
import haxe.macro.*; // <- error

function main() {
Tools.doSomething();
}
```

This example causes `Module haxe.macro.Tools does not define type Tools`, which doesn't happen in 4.3. The error doesn't really make sense given the code and importing directly is fine.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.