Bug 145 - Implementing Parameterized Interfaces
Implementing Parameterized Interfaces
Status: ASSIGNED
Product: loci
Classification: Unclassified
Component: Loci plugin
0.1
PC All
: P4 enhancement
: ---
Assigned To: amanjpro
http://java.net/projects/loci
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-18 21:11 UTC by amanjpro
Modified: 2011-03-18 21:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description amanjpro 2011-03-18 21:11:31 UTC
ello,

When implementing a parameterized type (say Comparable) if you provide the
type arguments, you also need to provide their correct annotations, otherwise
Loci rejects the code:
For example, this code produces an error:

@Local class A{}
class B extends A implements Comparable<B>{
   public Comparable getValue(){
      return new Test(); //Loci, complains about type incompatiblity
   }
   ...
}
Comment 1 amanjpro 2011-03-18 21:12:24 UTC
We are aware about this bug and work on it. For now, you can avoid it by
providing the correct annotation, that way Loci accepts it:

class B implements Comparable<@Local B>{
   public Comparable getValue(){
      return new Test(); //Loci, accepts this
   }
   ...
}