Hej,
Sorry again, I know you're tired of me 馃檭, and here, I even don't really know how to title that issue ...
A lot of time spent to isolate this issue : https://try.haxe.org/#f581b82f
abstract Outcome(Int) from Int to Int{ // Just comment this abstract and compiler "wake-up" lol
@:from static inline function fromEither(ei:haxe.ds.Either<String, Err>): Outcome
return switch ei {
case Right(e): 1;
case _ : 2;
}
}
abstract Err(Bool) from Bool to Bool {
//inline function new() return true; // You can also omit the constructor...
@:from inline static function fromInt(n:Int) {
return new Err(here, you, can, write, what, you, want, lol);
}
}
class Test {
static function main() {
var err : Err = 5;
trace( err );
}
}
It fails on all targets on try.haxe.
Just remove or comment the Outcome abstract and all works fine (I mean compiler throws the right errors and so on...)
The JS output is also "funny"...
Thanks for your help
Hej,
Sorry again, I know you're tired of me 馃檭, and here, I even don't really know how to title that issue ...
A lot of time spent to isolate this issue : https://try.haxe.org/#f581b82f
It fails on all targets on try.haxe.
Just remove or comment the
Outcomeabstract and all works fine (I mean compiler throws the right errors and so on...)The JS output is also "funny"...
Thanks for your help