HaxeFoundation / HaxeFoundation/haxe

[js] reserved field name conflicts

Open
#7,222 0 comments 0 reactions 0 assignees View on GitHub
platform-javascript
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

```haxe
class Main {
static var __name__ = "hello";

static function main() {
var o = {__class__: "hi!"};
trace(Type.typeof(o).match(TClass(_))); // true
Type.getClassName(Main); // FAIL
}
}
```

I think we should use `$`-prefixed names instead, so we don't conflict with valid haxe identifiers.

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.