equal
deleted
inserted
replaced
2193 Type inferred = deferredAttr.attribSpeculative(tree, env, findDiamondResult).type; |
2193 Type inferred = deferredAttr.attribSpeculative(tree, env, findDiamondResult).type; |
2194 Type polyPt = allowPoly ? |
2194 Type polyPt = allowPoly ? |
2195 syms.objectType : |
2195 syms.objectType : |
2196 clazztype; |
2196 clazztype; |
2197 if (!inferred.isErroneous() && |
2197 if (!inferred.isErroneous() && |
2198 types.isAssignable(inferred, pt().hasTag(NONE) ? polyPt : pt(), types.noWarnings)) { |
2198 (allowPoly && pt() == Infer.anyPoly ? |
|
2199 types.isSameType(inferred, clazztype) : |
|
2200 types.isAssignable(inferred, pt().hasTag(NONE) ? polyPt : pt(), types.noWarnings))) { |
2199 String key = types.isSameType(clazztype, inferred) ? |
2201 String key = types.isSameType(clazztype, inferred) ? |
2200 "diamond.redundant.args" : |
2202 "diamond.redundant.args" : |
2201 "diamond.redundant.args.1"; |
2203 "diamond.redundant.args.1"; |
2202 log.warning(tree.clazz.pos(), key, clazztype, inferred); |
2204 log.warning(tree.clazz.pos(), key, clazztype, inferred); |
2203 } |
2205 } |