Avoid this CCE found in the logs:
java.lang.ClassCastException: org.eclipse.objectteams.otdt.internal.core.compiler.lookup.WeakenedTypeBinding cannot be cast to org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding
        at org.eclipse.jdt.internal.compiler.ast.InstanceOfExpression.handledByGeneratedMethod(InstanceOfExpression.java:95)
- do not require RoleTypeBinding, DependentTypeBinding suffices.
- needed to pull up one method and a few fups for this approach to work.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
index 64b7e3e..5b16a03 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
@@ -19,7 +19,7 @@
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.lookup.*;
 import org.eclipse.objectteams.otdt.core.exceptions.InternalCompilerError;
-import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding;
+import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel;
 import org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transformer.StandardElementGenerator;
 import org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator;
@@ -89,10 +89,10 @@
 		{
 			if (TeamModel.isComparableToRole((ReferenceBinding)expressionType, (ReferenceBinding)castType))
 			{
-				if (!(castType instanceof RoleTypeBinding))
+				if (!(castType instanceof DependentTypeBinding))
 					castType = RoleTypeCreator.maybeWrapUnqualifiedRoleType(scope, castType, this);
 
-				RoleTypeBinding roleCastType = (RoleTypeBinding)castType;
+				DependentTypeBinding roleCastType = (DependentTypeBinding)castType;
 				if (roleCastType.hasEquivalentAnchorTo(expressionType))
 					return false;
 				if (! (scope instanceof BlockScope))
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java
index e3e88e8..50b2012 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java
@@ -285,6 +285,16 @@
 		return ((DependentTypeBinding)binding).type.kind() == TYPE_PARAMETER;
 	}
 
+	/** ignoring the type part, check if anchors are provably identical. */
+	public boolean hasEquivalentAnchorTo(TypeBinding otherType) {
+		if (otherType instanceof DependentTypeBinding) {
+			DependentTypeBinding otherRoleType = (DependentTypeBinding)otherType;
+			if (this._teamAnchor.hasSameBestNameAs(otherRoleType._teamAnchor))
+				return true;
+		}
+		return false;
+	}
+
 	@Override
 	public boolean isEquivalentTo(TypeBinding otherType) {
 		if (! (otherType instanceof DependentTypeBinding))
@@ -422,5 +432,4 @@
 		}
 		return anchorName;
 	}
-
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java
index a0ac06d..c1f95ef 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java
@@ -1,7 +1,7 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  *
- * Copyright 2003, 2006 Fraunhofer Gesellschaft, Munich, Germany,
+ * Copyright 2003, 2010 Fraunhofer Gesellschaft, Munich, Germany,
  * for its Fraunhofer Institute for Computer Architecture and Software
  * Technology (FIRST), Berlin, Germany and Technical University Berlin,
  * Germany.
@@ -875,15 +875,6 @@
 			&& CharOperation.equals(otherDep.internalName(), internalName());
 	}
 
-	/** ignoring the role part, check if anchors are provably identical. */
-	public boolean hasEquivalentAnchorTo(TypeBinding otherType) {
-		if (otherType instanceof RoleTypeBinding) {
-			RoleTypeBinding otherRoleType = (RoleTypeBinding)otherType;
-			if (this._teamAnchor.hasSameBestNameAs(otherRoleType._teamAnchor))
-				return true;
-		}
-		return false;
-	}
     // =========== VARIOUS NAMES: =============
 
     public char[] qualifiedSourceName() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/StandardElementGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/StandardElementGenerator.java
index ba0af55..1c85a50 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/StandardElementGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/StandardElementGenerator.java
@@ -1,7 +1,7 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  *
- * Copyright 2004, 2006 Fraunhofer Gesellschaft, Munich, Germany,
+ * Copyright 2004, 2010 Fraunhofer Gesellschaft, Munich, Germany,
  * for its Fraunhofer Institute for Computer Architecture and Software
  * Technology (FIRST), Berlin, Germany and Technical University Berlin,
  * Germany.
@@ -43,6 +43,7 @@
 import org.eclipse.objectteams.otdt.internal.core.compiler.control.ITranslationStates;
 import org.eclipse.objectteams.otdt.internal.core.compiler.control.StateMemento;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lifting.TreeNode;
+import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.TThisBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.FieldModel;
@@ -352,7 +353,7 @@
 	 * @param castType
 	 */
 	public static Expression createRoleInstanceOfCheck(
-			BlockScope scope, InstanceOfExpression expr, ReferenceBinding exprType, RoleTypeBinding castType) {
+			BlockScope scope, InstanceOfExpression expr, ReferenceBinding exprType, DependentTypeBinding castType) {
 
 		AstGenerator gen = new AstGenerator(expr.sourceStart, expr.sourceEnd);
 		Expression teamInstanceComparison;
@@ -457,7 +458,7 @@
 	 * @param end end of source code position (fake).
 	 * @return a new EqualExpression
 	 */
-	private static EqualExpression createAnchorEqualCheck(BlockScope scope, RoleTypeBinding left, RoleTypeBinding right, int start, int end)
+	private static EqualExpression createAnchorEqualCheck(BlockScope scope, DependentTypeBinding left, DependentTypeBinding right, int start, int end)
 	{
 		AstGenerator gen = new AstGenerator(start,end);
 		Expression exprTeam = createTeamAnchorReference(scope, left, gen);
@@ -473,14 +474,14 @@
 	 * @param pos faked source code position (encoded start and end).
 	 * @return a new reference
 	 */
-	private static Expression createTeamAnchorReference(BlockScope scope, RoleTypeBinding roleType, AstGenerator gen) {
+	private static Expression createTeamAnchorReference(BlockScope scope, DependentTypeBinding roleType, AstGenerator gen) {
 		Expression teamExpr = createTeamExpression(roleType, gen);
 		teamExpr.resolveType(scope);
 		return teamExpr;
 	}
 
 	/** Create an expression evaluating to the team instance inherent to the given role type. */
-	public static Expression createTeamExpression(RoleTypeBinding roleType, AstGenerator gen)
+	public static Expression createTeamExpression(DependentTypeBinding roleType, AstGenerator gen)
 	{
 		return (roleType._teamAnchor instanceof TThisBinding) ?
 				gen.qualifiedThisReference((ReferenceBinding)roleType._teamAnchor.getResolvedType())