HaxeFoundation / HaxeFoundation/haxe

Enum abstract not checked

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

Description

Surprisingly the following compile while it shouldn't ( T should be Int on step++)

```haxe
enum abstract T(Int) {
var Start;
var End;
}

class Test {

static var step(default,set) : T;

static function set_step(s:T) { step = s; return s; }

static function main() {
step++;
}
}
```

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.