Closed malublu closed 6 years ago
Abstracts are not run-time types and will only be represented at run-time as their underlying type (so always A
in this case), thus they can't implement interfaces, which is a runtime dispatching mechanism.
Oh, and also this is not a proper evolution proposal, see README
Btw. what you probably want to do is @:forward(...) abstract NewClass(AnInterface) from AnInterface to AnInterface
. Read about it in Haxe's manual - Forwarding abstract fields.
Hi i think about a feature that haxe not support yet.
Currently i do it like this:
What you think about it? From: (https://github.com/HaxeFoundation/haxe/issues/6678)
Example:
And it can be compiled like an extends (but only for compile time):