HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.17k stars 656 forks source link

Can @:forward also forward underlying operator overloads? #5035

Open kevinresol opened 8 years ago

kevinresol commented 8 years ago

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

Simn commented 8 years ago

maybe

haxiomic commented 8 years ago

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?

Geokureli commented 4 years ago

this would be great for abstracts of numeric types

Simn commented 4 years ago

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.

Gama11 commented 4 years ago

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.

RealyUniqueName commented 4 years ago

I agree this should be a new meta.

PXshadow commented 2 years ago

Any news on this?

kvbc commented 1 year ago

That would be really great