HaxeFoundation / HaxeFoundation/haxe

@:arrayAccess is unable to resolve unimported enum constructor name

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

Description

E.hx (separate file)
```haxe
enum E {
A;
B;
}
```

Main.hx
```haxe
abstract Abs(Dynamic) {
@:arrayAccess public function get(key:E):Int return 1;
}

class Main {
static var p:Abs;
static function main() {
$type(p.get(A)); // OK
$type(p[A]); // ERROR: Unknown identifier : A
}
}
```

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.