haxe icon indicating copy to clipboard operation
haxe copied to clipboard

forwarded abstract fields are not available through a constrained type parameter

Open nadako opened this issue 5 years ago • 2 comments

@:forward(forwarded)
abstract A({function forwarded():Void;}) {
	public function defined() {}
}

function f<TA:A>(v:TA) {
	v.defined(); // works
	v.forwarded(); // doesn't work
}

nadako avatar Jun 13 '20 10:06 nadako

(this is not a regression)

nadako avatar Jun 13 '20 10:06 nadako

also, forwarded shows up in the completion :)

nadako avatar Jun 13 '20 10:06 nadako