You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a followup to #11535, it seems I cut down my repro a bit too much to expose all the fun exciting quirks.
The fix for the previous issue works fine for direct classes, but breaks when pointing through abstracts, as below. The only change from the previous repro is that we're now coming @:from the Bar abstract instead of BarImpl directly.
// Bar
// Removing this @:structInit will fix the build.
@:structInit
class BarImpl {
public function new() {}
}
@:forward
abstract Bar(BarImpl) from BarImpl to BarImpl {
}
// FooImpl
@:structInit
class FooImpl {
public var x:Float;
public function new(x:Float) {
this.x = x;
}
}
// Foo
@:forward
abstract Foo(FooImpl) from FooImpl to FooImpl {
public function new(x:Float) {
this = new FooImpl(x);
}
@:from
static public function fromBar(v:Bar):Foo {
return new Foo(1);
}
}
// Main
class Test {
static function main() {
var v:Foo = {x: 2};
trace(v.x);
}
}
Oh god I hope this title makes sense.
This is a followup to #11535, it seems I cut down my repro a bit too much to expose all the fun exciting quirks.
The fix for the previous issue works fine for direct classes, but breaks when pointing through abstracts, as below. The only change from the previous repro is that we're now coming
@:from
theBar
abstract instead ofBarImpl
directly.Tested against haxe nightly 6ab9980
Repro:
try.haxe: https://try.haxe.org/#54AAA5cC
The text was updated successfully, but these errors were encountered: