Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Objectteams » Problems with Brole playedBy Arole
Problems with Brole playedBy Arole [message #568060] Fri, 12 February 2010 12:06
Eugene Hutorny is currently offline Eugene HutornyFriend
Messages: 109
Registered: January 2010
Senior Member
Hi Stephan,

I've made some more experiments with OT/J and got some more questions.

My teams are declares as the following (complete source

public team class Ateam {
public class Arole playedBy Aclass {

public team class Bteam {
private final Ateam ateam;
public class Brole playedBy Arole<@ateam> {
public Brole lift(Arole<@ateam> as Brole brole) {
return brole;

public team class Cteam extends Ateam {
public class Crole extends Arole playedBy Aclass {

For the following code compiler generates error: The method lift(Arole<@bteam.ateam>) in the type Bteam is not applicable for the arguments (Arole<@ateam>)

Arole<@ateam> arole = ateam.lift(aclass);

How to make the type applicable?

The following code fails with class cast exception:

final Cteam cteam = new Cteam();
final Bteam dteam = new Bteam(cteam);

within(cteam) {
within(dteam) {;

Exception in thread "main" java.lang.ClassCastException:$__OT__Crole
at$ )
Previous Topic:OTDT 1.4.0M3 released
Next Topic:Problems with Brole playedBy Arole
Goto Forum:

Current Time: Mon Oct 05 10:21:11 GMT 2015

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

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