if (type != null) { if (other.type != null) { mergedType = type.getCommonSuperclass(other.type); } else { mergedType = type;
return other.getCommonSuperclass(this);
public static boolean isNotWideningConversion(RegisterType originalType, RegisterType newType) { if (originalType.type == null || newType.type == null) { return true; } if (originalType.type.isInterface()) { return newType.type.implementsInterface(originalType.type.getType()); } else { TypeProto commonSuperclass = newType.type.getCommonSuperclass(originalType.type); if (commonSuperclass.getType().equals(originalType.type.getType())) { return true; } if (commonSuperclass.getType().equals(newType.type.getType())) { return false; } } return true; }
if (type != null) { if (other.type != null) { mergedType = type.getCommonSuperclass(other.type); } else { mergedType = type;
if (type != null) { if (other.type != null) { mergedType = type.getCommonSuperclass(other.type); } else { mergedType = type;
return other.getCommonSuperclass(this);
return other.getCommonSuperclass(this);
public static boolean isNotWideningConversion(RegisterType originalType, RegisterType newType) { if (originalType.type == null || newType.type == null) { return true; } if (originalType.type.isInterface()) { return newType.type.implementsInterface(originalType.type.getType()); } else { TypeProto commonSuperclass = newType.type.getCommonSuperclass(originalType.type); if (commonSuperclass.getType().equals(originalType.type.getType())) { return true; } if (commonSuperclass.getType().equals(newType.type.getType())) { return false; } } return true; }
public void superclassTest(ClassPath classPath, String commonSuperclass, String type1, String type2) { TypeProto commonSuperclassProto = classPath.getClass(commonSuperclass); TypeProto type1Proto = classPath.getClass(type1); TypeProto type2Proto = classPath.getClass(type2); Assert.assertSame(commonSuperclassProto, type1Proto.getCommonSuperclass(type2Proto)); Assert.assertSame(commonSuperclassProto, type2Proto.getCommonSuperclass(type1Proto)); }
TypeProto thisClass = classPath.getClass(elementType); TypeProto otherClass = classPath.getClass(((ArrayProto)other).elementType); TypeProto mergedClass = thisClass.getCommonSuperclass(otherClass); if (thisClass == mergedClass) { return this; return other.getCommonSuperclass(this);
TypeProto thisClass = classPath.getClass(elementType); TypeProto otherClass = classPath.getClass(((ArrayProto)other).elementType); TypeProto mergedClass = thisClass.getCommonSuperclass(otherClass); if (thisClass == mergedClass) { return this; return other.getCommonSuperclass(this);
TypeProto thisClass = classPath.getClass(elementType); TypeProto otherClass = classPath.getClass(((ArrayProto)other).elementType); TypeProto mergedClass = thisClass.getCommonSuperclass(otherClass); if (thisClass == mergedClass) { return this; return other.getCommonSuperclass(this);
oldClassPath.getClass(onetwo).getCommonSuperclass(new ClassProto(oldClassPath, onetwo)).getType()); newClassPath.getClass(onetwo).getCommonSuperclass(new ClassProto(newClassPath, onetwo)).getType());