1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java Thu Feb 03 09:35:21 2011 +0000 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java Thu Feb 03 09:36:28 2011 +0000 1.3 @@ -2049,8 +2049,14 @@ 1.4 return null; 1.5 1.6 if (isOperator(name)) { 1.7 - return diags.create(dkind, log.currentSource(), 1.8 - pos, "operator.cant.be.applied", name, argtypes); 1.9 + boolean isUnaryOp = argtypes.size() == 1; 1.10 + String key = argtypes.size() == 1 ? 1.11 + "operator.cant.be.applied" : 1.12 + "operator.cant.be.applied.1"; 1.13 + Type first = argtypes.head; 1.14 + Type second = !isUnaryOp ? argtypes.tail.head : null; 1.15 + return diags.create(dkind, log.currentSource(), pos, 1.16 + key, name, first, second); 1.17 } 1.18 else { 1.19 Symbol ws = sym.asMemberOf(site, types);