/** Check that class c does not implement directly or indirectly * the same parameterized interface with two different argument lists. * @param pos Position to be used for error reporting. * @param type The type whose interfaces are checked. */ void checkClassBounds(DiagnosticPosition pos, Type type) { checkClassBounds(pos, new HashMap<TypeSymbol,Type>(), type); } //where
/** Check that class c does not implement directly or indirectly * the same parameterized interface with two different argument lists. * @param pos Position to be used for error reporting. * @param type The type whose interfaces are checked. */ void checkClassBounds(DiagnosticPosition pos, Type type) { checkClassBounds(pos, new HashMap<TypeSymbol,Type>(), type); } //where
/** Check that class c does not implement directly or indirectly * the same parameterized interface with two different argument lists. * @param pos Position to be used for error reporting. * @param type The type whose interfaces are checked. */ void checkClassBounds(DiagnosticPosition pos, Type type) { checkClassBounds(pos, new HashMap<TypeSymbol,Type>(), type); } //where
/** Check that class c does not implement directly or indirectly * the same parameterized interface with two different argument lists. * @param pos Position to be used for error reporting. * @param type The type whose interfaces are checked. */ void checkClassBounds(DiagnosticPosition pos, Type type) { checkClassBounds(pos, new HashMap<TypeSymbol,Type>(), type); } //where
@Override public void visitTypeParameter(JCTypeParameter tree) { validateTrees(tree.bounds, true, isOuter); checkClassBounds(tree.pos(), tree.type); }
@Override public void visitTypeParameter(JCTypeParameter tree) { validateTrees(tree.bounds, true, isOuter); checkClassBounds(tree.pos(), tree.type); }
public void visitTypeParameter(JCTypeParameter tree) { validate(tree.bounds); checkClassBounds(tree.pos(), tree.type); }
public void visitTypeParameter(JCTypeParameter tree) { validate(tree.bounds); checkClassBounds(tree.pos(), tree.type); }
/** Enter all interfaces of type `type' into the hash table `seensofar' * with their class symbol as key and their type as value. Make * sure no class is entered with two different types. */ void checkClassBounds(DiagnosticPosition pos, Map<TypeSymbol,Type> seensofar, Type type) { if (type.isErroneous()) return; for (List<Type> l = types.interfaces(type); l.nonEmpty(); l = l.tail) { Type it = l.head; Type oldit = seensofar.put(it.tsym, it); if (oldit != null) { List<Type> oldparams = oldit.allparams(); List<Type> newparams = it.allparams(); if (!types.containsTypeEquivalent(oldparams, newparams)) log.error(pos, "cant.inherit.diff.arg", it.tsym, Type.toString(oldparams), Type.toString(newparams)); } checkClassBounds(pos, seensofar, it); } Type st = types.supertype(type); if (st != null) checkClassBounds(pos, seensofar, st); }
/** Enter all interfaces of type `type' into the hash table `seensofar' * with their class symbol as key and their type as value. Make * sure no class is entered with two different types. */ void checkClassBounds(DiagnosticPosition pos, Map<TypeSymbol,Type> seensofar, Type type) { if (type.isErroneous()) return; for (List<Type> l = types.interfaces(type); l.nonEmpty(); l = l.tail) { Type it = l.head; Type oldit = seensofar.put(it.tsym, it); if (oldit != null) { List<Type> oldparams = oldit.allparams(); List<Type> newparams = it.allparams(); if (!types.containsTypeEquivalent(oldparams, newparams)) log.error(pos, "cant.inherit.diff.arg", it.tsym, Type.toString(oldparams), Type.toString(newparams)); } checkClassBounds(pos, seensofar, it); } Type st = types.supertype(type); if (st != null) checkClassBounds(pos, seensofar, st); }
/** Enter all interfaces of type `type' into the hash table `seensofar' * with their class symbol as key and their type as value. Make * sure no class is entered with two different types. */ void checkClassBounds(DiagnosticPosition pos, Map<TypeSymbol,Type> seensofar, Type type) { if (type.isErroneous()) return; for (List<Type> l = types.interfaces(type); l.nonEmpty(); l = l.tail) { Type it = l.head; Type oldit = seensofar.put(it.tsym, it); if (oldit != null) { List<Type> oldparams = oldit.allparams(); List<Type> newparams = it.allparams(); if (!types.containsTypeEquivalent(oldparams, newparams)) log.error(pos, "cant.inherit.diff.arg", it.tsym, Type.toString(oldparams), Type.toString(newparams)); } checkClassBounds(pos, seensofar, it); } Type st = types.supertype(type); if (st != null) checkClassBounds(pos, seensofar, st); }
/** Enter all interfaces of type `type' into the hash table `seensofar' * with their class symbol as key and their type as value. Make * sure no class is entered with two different types. */ void checkClassBounds(DiagnosticPosition pos, Map<TypeSymbol,Type> seensofar, Type type) { if (type.isErroneous()) return; for (List<Type> l = types.interfaces(type); l.nonEmpty(); l = l.tail) { Type it = l.head; Type oldit = seensofar.put(it.tsym, it); if (oldit != null) { List<Type> oldparams = oldit.allparams(); List<Type> newparams = it.allparams(); if (!types.containsTypeEquivalent(oldparams, newparams)) log.error(pos, "cant.inherit.diff.arg", it.tsym, Type.toString(oldparams), Type.toString(newparams)); } checkClassBounds(pos, seensofar, it); } Type st = types.supertype(type); if (st != Type.noType) checkClassBounds(pos, seensofar, st); }
chk.checkClassBounds(tree.pos(), c.type);
chk.checkClassBounds(tree.pos(), c.type);
chk.checkClassBounds(tree.pos(), c.type);
chk.checkClassBounds(tree.pos(), c.type);