haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Can @:forward also forward underlying operator overloads?

Open kevinresol opened this issue 9 years ago • 7 comments

If I have an abstract over another abstract, the @:forward meta won't forward the underlying abstract's operator overloads. Can it be supported?

Example: http://try.haxe.org/#eBedf

kevinresol avatar Apr 04 '16 09:04 kevinresol

maybe

Simn avatar Apr 04 '16 12:04 Simn

Just ran into this myself - I assumed @:forward would carry over the operator overloads by default (same goes for @:to, @:from metas). I guess for now adding to and from the base type does the same job?

haxiomic avatar Jul 30 '16 15:07 haxiomic

this would be great for abstracts of numeric types

Geokureli avatar Oct 31 '19 18:10 Geokureli

This is mostly a design question because I'm not sure if @:forward should pick up additional semantics like that, or if a different metadata should be used instead.

Simn avatar Feb 19 '20 11:02 Simn

Using the same meta could have unintended side effects for existing code at this point, exposing operators that were not meant to be exposed by the author.

Gama11 avatar Feb 19 '20 11:02 Gama11

I agree this should be a new meta.

RealyUniqueName avatar Feb 19 '20 16:02 RealyUniqueName

Any news on this?

PXshadow avatar Mar 25 '22 19:03 PXshadow

That would be really great

kvbc avatar Apr 08 '23 11:04 kvbc