haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Abstract methods in generic, abstract classes cause compile errors

Open Jrayp opened this issue 3 years ago • 0 comments
trafficstars

Haxe 4.2.5

I'm not sure if there is a logical reason for this, but it seems like a bug to me. See https://try.haxe.org/#b501c2DC

class Test {
	static function main() {}
}

@:generic
abstract class A<T> {
	abstract function foo():Void;
}

class B extends A<Int> {
	function foo() {}
}

This causes two errors:

Test.hx:7: characters 2-31 : Field foo has no expression (possible typing order issue)
Test.hx:10: characters 17-23 : While building A_Int

Jrayp avatar Jun 25 '22 07:06 Jrayp