697 * Typevariables always precede other kinds of symbols. |
697 * Typevariables always precede other kinds of symbols. |
698 */ |
698 */ |
699 public final boolean precedes(TypeSymbol that, Types types) { |
699 public final boolean precedes(TypeSymbol that, Types types) { |
700 if (this == that) |
700 if (this == that) |
701 return false; |
701 return false; |
702 if (this.type.tag == that.type.tag) { |
702 if (type.hasTag(that.type.getTag())) { |
703 if (this.type.hasTag(CLASS)) { |
703 if (type.hasTag(CLASS)) { |
704 return |
704 return |
705 types.rank(that.type) < types.rank(this.type) || |
705 types.rank(that.type) < types.rank(this.type) || |
706 types.rank(that.type) == types.rank(this.type) && |
706 types.rank(that.type) == types.rank(this.type) && |
707 that.getQualifiedName().compareTo(this.getQualifiedName()) < 0; |
707 that.getQualifiedName().compareTo(this.getQualifiedName()) < 0; |
708 } else if (this.type.hasTag(TYPEVAR)) { |
708 } else if (type.hasTag(TYPEVAR)) { |
709 return types.isSubtype(this.type, that.type); |
709 return types.isSubtype(this.type, that.type); |
710 } |
710 } |
711 } |
711 } |
712 return this.type.hasTag(TYPEVAR); |
712 return type.hasTag(TYPEVAR); |
713 } |
713 } |
714 |
714 |
715 @Override |
715 @Override |
716 public java.util.List<Symbol> getEnclosedElements() { |
716 public java.util.List<Symbol> getEnclosedElements() { |
717 List<Symbol> list = List.nil(); |
717 List<Symbol> list = List.nil(); |