src/share/classes/com/sun/tools/javac/comp/Resolve.java

changeset 972
694ff82ca68e
parent 971
bfbc197b560f
child 1006
a2d422d480cb
equal deleted inserted replaced
971:bfbc197b560f 972:694ff82ca68e
344 mt = types.subst(mt, env.info.tvars, tvars); 344 mt = types.subst(mt, env.info.tvars, tvars);
345 } 345 }
346 if (typeargtypes == null) typeargtypes = List.nil(); 346 if (typeargtypes == null) typeargtypes = List.nil();
347 if (mt.tag != FORALL && typeargtypes.nonEmpty()) { 347 if (mt.tag != FORALL && typeargtypes.nonEmpty()) {
348 // This is not a polymorphic method, but typeargs are supplied 348 // This is not a polymorphic method, but typeargs are supplied
349 // which is fine, see JLS3 15.12.2.1 349 // which is fine, see JLS 15.12.2.1
350 } else if (mt.tag == FORALL && typeargtypes.nonEmpty()) { 350 } else if (mt.tag == FORALL && typeargtypes.nonEmpty()) {
351 ForAll pmt = (ForAll) mt; 351 ForAll pmt = (ForAll) mt;
352 if (typeargtypes.length() != pmt.tvars.length()) 352 if (typeargtypes.length() != pmt.tvars.length())
353 throw inapplicableMethodException.setMessage("arg.length.mismatch"); // not enough args 353 throw inapplicableMethodException.setMessage("arg.length.mismatch"); // not enough args
354 // Check type arguments are within bounds 354 // Check type arguments are within bounds
1767 return syms.errSymbol; 1767 return syms.errSymbol;
1768 } 1768 }
1769 1769
1770 /** 1770 /**
1771 * Resolve an appropriate implicit this instance for t's container. 1771 * Resolve an appropriate implicit this instance for t's container.
1772 * JLS2 8.8.5.1 and 15.9.2 1772 * JLS 8.8.5.1 and 15.9.2
1773 */ 1773 */
1774 Type resolveImplicitThis(DiagnosticPosition pos, Env<AttrContext> env, Type t) { 1774 Type resolveImplicitThis(DiagnosticPosition pos, Env<AttrContext> env, Type t) {
1775 return resolveImplicitThis(pos, env, t, false); 1775 return resolveImplicitThis(pos, env, t, false);
1776 } 1776 }
1777 1777

mercurial