changeset 2340:3a09eb2a05a1

Obviously, the receiver parameter name should not contain type annotations - improving the toString of Type now shows them.
author wmdietl
date Wed, 20 Mar 2013 18:35:55 +0100
parents b714520030c4
children 24fa2b8e4463
files src/share/classes/com/sun/tools/javac/comp/Attr.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Wed Mar 20 18:35:11 2013 +0100
+++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Wed Mar 20 18:35:55 2013 +0100
@@ -954,7 +954,7 @@
                     {
                         // Make sure the receiver parameter name is as expected
                         String fnd = tree.recvparam.nameexpr.toString();
-                        String exp = recvtype.toString() + '.' + names._this.toString();
+                        String exp = recvtype.unannotatedType().toString() + '.' + names._this.toString();
                         if (!exp.endsWith(fnd)) {
                             log.error(tree.recvparam.pos(), "receiver.parameter.wrong.name", exp, fnd);
                         }