HaxeFoundation / HaxeFoundation/haxe
abstract @:to casts are not considered for operators
Open
feature-abstracts
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
```haxe
abstract A(Int) from Int {
@:to function toInt():Int return this;
}
class Main {
static function main() {
10 + (10 : A);
}
}
```
This gives `A should be Int`, however I would expect it to call `toInt()`, especially considering that adding direct `to Int` works.
Contributor guide
Assessment
This issue has not been assessed yet.