HaxeFoundation / HaxeFoundation/haxe

Operator overloading together with PosInfos

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

Description

Currently this is not possible:
```haxe
abstract May(Null) from Null {
@:op(A!) public inline function unwrap(?pos: haxe.PosInfos): T {
if(this == null) {
throw 'unwrap null $pos';
}
return this;
}
}
```
Error: `Null -> ?pos : Null -> May.T` should be `Null -> Unknown<0>`

It would be very nice to have this.

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.