This page is no longer maintained — Please continue to the home page at www.scala-lang.org

@bridge looks problematic

3 replies
gkossakowski
Joined: 2010-03-11,
User offline. Last seen 33 weeks 5 days ago.
Hi,
I wanted to ask what's the current opinion about bridge annotation? Is it going to stay or go away?
I'm asking because @bridge introduces a new set of problems I need to solve while working on Scala+GWT. Specifically, @bridge triggers generation of overloaded by return type method definitions. I believe they are introduced in mixin phase.
Since I'm running after cleanup I need to handle them. On the other hand, they were introduced to deal with binary compatibility of class files. Binary compatiblity is not an issue for me so I'd like to ignore existence of bridge methods altogether.
Supporting method overloading on return type in my project looks like a lot of work that I'd like to avoid doing.
They key question is: what's the future of @bridge annotation? Should I be investing my time into defending myself from implications of it's existence?

--
Grzegorz Kossakowski

soc
Joined: 2010-02-07,
User offline. Last seen 34 weeks 5 days ago.
Re: @bridge looks problematic

Hi,
> Should I be investing my time into defending myself from implications
> of it's existence?
Can't you just check the "isSynthetic" attribute of the method?

Bye,

Simon

gkossakowski
Joined: 2010-03-11,
User offline. Last seen 33 weeks 5 days ago.
Re: @bridge looks problematic
On 15 July 2011 21:26, Simon Ochsenreither <simon@ochsenreither.de> wrote:
Hi,
Should I be investing my time into defending myself from implications of it's existence?
Can't you just check the "isSynthetic" attribute of the method?

I believe that synthetic methods are used for other purposes too like for getters and setters, etc. 
Am I right?
--
Grzegorz Kossakowski

soc
Joined: 2010-02-07,
User offline. Last seen 34 weeks 5 days ago.
Re: @bridge looks problematic

Hi,
>
> I believe that synthetic methods are used for other purposes too like
> for getters and setters, etc.
>
Possible, yes. Maybe just check if there is a synthetic and a
non-synthetic one with the same name and ignore the first one or
something like that ...

Bye, Simon

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland