langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 939 38e24969c7e9
parent 735 372aa565a221
child 941 2589047a9c5d
equal deleted inserted replaced
938:13aae74ca013 939:38e24969c7e9
   170         if (owntype.tag != ERROR && pt.tag != METHOD && pt.tag != FORALL) {
   170         if (owntype.tag != ERROR && pt.tag != METHOD && pt.tag != FORALL) {
   171             if ((ownkind & ~pkind) == 0) {
   171             if ((ownkind & ~pkind) == 0) {
   172                 owntype = chk.checkType(tree.pos(), owntype, pt);
   172                 owntype = chk.checkType(tree.pos(), owntype, pt);
   173             } else {
   173             } else {
   174                 log.error(tree.pos(), "unexpected.type",
   174                 log.error(tree.pos(), "unexpected.type",
   175                           Resolve.kindNames(pkind),
   175                           kindNames(pkind),
   176                           Resolve.kindName(ownkind));
   176                           kindName(ownkind));
   177                 owntype = syms.errType;
   177                 owntype = syms.errType;
   178             }
   178             }
   179         }
   179         }
   180         tree.type = owntype;
   180         tree.type = owntype;
   181         return owntype;
   181         return owntype;