HaxeFoundation / HaxeFoundation/haxe

[cpp] @:include for extern enum abstract not working

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

Description

In the following example, the generated code in `Main.cpp` does not have `#include "mode.hpp"`, causing native compilation error.

```haxe
@:include("mode.hpp") @:native("foo::Mode")
extern enum abstract Mode(Int) {
final X;
}
```

```haxe
class Main {
static function main() {
trace(Mode.X);
}
```

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.