67 import com.sun.tools.javac.code.Type.ArrayType; |
67 import com.sun.tools.javac.code.Type.ArrayType; |
68 import com.sun.tools.javac.code.Type.ClassType; |
68 import com.sun.tools.javac.code.Type.ClassType; |
69 import com.sun.tools.javac.code.Type.ErrorType; |
69 import com.sun.tools.javac.code.Type.ErrorType; |
70 import com.sun.tools.javac.code.Type.UnionClassType; |
70 import com.sun.tools.javac.code.Type.UnionClassType; |
71 import com.sun.tools.javac.code.Types; |
71 import com.sun.tools.javac.code.Types; |
|
72 import com.sun.tools.javac.code.TypeTag; |
72 import com.sun.tools.javac.code.Types.TypeRelation; |
73 import com.sun.tools.javac.code.Types.TypeRelation; |
73 import com.sun.tools.javac.comp.Attr; |
74 import com.sun.tools.javac.comp.Attr; |
74 import com.sun.tools.javac.comp.AttrContext; |
75 import com.sun.tools.javac.comp.AttrContext; |
75 import com.sun.tools.javac.comp.Enter; |
76 import com.sun.tools.javac.comp.Enter; |
76 import com.sun.tools.javac.comp.Env; |
77 import com.sun.tools.javac.comp.Env; |
651 return visit(s, t); |
652 return visit(s, t); |
652 |
653 |
653 switch (t.getTag()) { |
654 switch (t.getTag()) { |
654 case BYTE: case CHAR: case SHORT: case INT: case LONG: case FLOAT: |
655 case BYTE: case CHAR: case SHORT: case INT: case LONG: case FLOAT: |
655 case DOUBLE: case BOOLEAN: case VOID: case BOT: case NONE: |
656 case DOUBLE: case BOOLEAN: case VOID: case BOT: case NONE: |
656 return t.getTag() == s.getTag(); |
657 return t.hasTag(s.getTag()); |
657 |
|
658 default: |
658 default: |
659 throw new AssertionError("fuzzyMatcher " + t.getTag()); |
659 throw new AssertionError("fuzzyMatcher " + t.getTag()); |
660 } |
660 } |
661 } |
661 } |
662 |
662 |
683 return t.tsym == s.tsym; |
683 return t.tsym == s.tsym; |
684 } |
684 } |
685 |
685 |
686 @Override |
686 @Override |
687 public Boolean visitErrorType(ErrorType t, Type s) { |
687 public Boolean visitErrorType(ErrorType t, Type s) { |
688 return s.getTag() == CLASS |
688 return s.hasTag(CLASS) |
689 && t.tsym.name == ((ClassType) s).tsym.name; |
689 && t.tsym.name == ((ClassType) s).tsym.name; |
690 } |
690 } |
691 }; |
691 }; |
692 |
692 |
693 public TypeMirror getTypeMirror(TreePath path) { |
693 public TypeMirror getTypeMirror(TreePath path) { |