HaxeFoundation / HaxeFoundation/haxe

Context.defineModule on exists module with TDField not works

Open
#10,374 19 comments 0 reactions 1 assignee Claimed by @kLabz View on GitHub
bug feature-compiler-cache platform-macro
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

I can use `Context.defineModule` to create a extra class in a module to inject some stuff.
This works fine.
If i use TDField the compiler throws an error: `File "src/typing/typeloadModule.ml", line 402, characters 4-10: Assertion failed`

```haxe
Context.defineModule('sub.test.Test', [{
pos: Context.currentPos(),
pack: ['sub', 'test'],
name: 'SomeFancyVarName',
params: [],
meta: [],
kind: TDField(FVar(null, macro null), [AInline, AFinal]),
fields: []
}]);
```

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.