Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Objectteams » Understanding or Bug?
Understanding or Bug? [message #573920] Fri, 30 April 2010 15:02
Jan Marc Hoffmann is currently offline Jan Marc Hoffmann
Messages: 32
Registered: July 2009
Member
Here is what I did:


public team class OuterTeam {

public team class InnerTeam playedBy OuterBase {

protected class SomeRole playedBy InnerBase {
}

@SuppressWarnings("ambiguouslowering")
public void createRole(InnerBase as SomeRole b) {
System.out.println(OuterTeam.this.hasRole(b, SomeRole.class));
}
}

public InnerTeam registerInnerTeam(OuterBase as InnerTeam o) {
return o;
}
}


Called by:


public class Main {

public static void main(String[] args) {
OuterBase ob = new OuterBase();
InnerBase ib = new InnerBase();
final OuterTeam ot = new OuterTeam();
InnerTeam<@ot> it = ot.registerInnerTeam(ob);
it.createRole(ib);
}
}


Results in:


Exception in thread "main" java.lang.NoSuchMethodError: otdtbugs.OuterTeam$InnerTeam._OT$getClass$SomeRole()Ljava/la ng/Class;
at otdtbugs.OuterTeam$__OT__InnerTeam.createRole(OuterTeam.java :12)
at otdtbugs.Main.main(Main.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.cs3.jmangler.bootstrap.Start.main(Start.java:66)


The exact same code works fine if the second argument of the hasRole method is omitted.

Really troublesome got this when I used it in conclusion with the ObjectRegistration Pattern ( http://trac.objectteams.org/ot/wiki/OtPatterns/ObjectRegistr ation). Used in GuardPredicates no error will get thrown and the Base wont get lifted.

Is there an error in my understanding or is this a bug?

greetings and congratulations on the approval

Jan Marc
Previous Topic:"We're in!"
Next Topic:Understanding or Bug?
Goto Forum:
  


Current Time: Sun Sep 21 06:17:46 GMT 2014

Powered by FUDForum. Page generated in 0.01551 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software