Rémi Forax schrieb:
> Jochen Theodorou a écrit :
[...]
> I don't know if there is a spec for synthetic.
> In javac, during the method lookup, synthetic method aren't take into 
> account.
> Synthetic method is an artifact used by the compiler to fill the holes
> between the jls spec and the jvm spec.

If I have:

interface A<T> {
   T foo();
}

abstract class B implements A<String>{
   public String foo(){
     return null;
   }
}

class C extends B {}

all in Java, the it compiles... but B has a

public volatile synthetic bridge foo()Ljava/lang/Object;

because of covariant returns... so far so good... still we have a 
synthetic method here. When we compile C, then why, if the compiler 
doesn't take synthetic methods into account, does this not throw an 
error? Is it because of the other modifiers?

bye blackdrag

-- 
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to