HaxeFoundation / HaxeFoundation/haxe
ReferenceError / Instance prototype not found
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
The following sample yields on `js` and `eval` but not on `hl` or `neko` (Haxe 4.3.1 on https://try.haxe.org/#02bf26bF):
```haxe
class Test {
static var sub = new Sub();
static function main() {}
}
@:keep class Sub extends Test {
public function new() {}
}
```
JavaScript yields:
```
ReferenceError: can't access lexical declaration 'Test' before initialization
````
Eval yields:
```
[WARNING] Test.hx:1: lines 1-5
1 | class Test {
- | [...]
5 | }
|
| (WStaticInitOrder) Warning : maybe loop in static generation of Test
[ERROR] Test.hx:1: lines 1-5
1 | class Test {
- | [...]
5 | }
|
| [0] Instance prototype not found: Test
```
Contributor guide
Assessment
This issue has not been assessed yet.