Checking the receiver name
Jonathan Gibbons
jonathan.gibbons at oracle.com
Fri May 10 14:53:50 PDT 2013
Werner,
As part of the JCReceiverVariableDecl cleanup, I deliberately removed a
check on the validity of the name of the receiver parameter.
This was for number of reasons
-- the tests (i.e. in test/**) were failing after I added the call to
Attr the name in MemberEnter
-- the check in Attr looked dubious, using string equality
-- the check in Attr is happening at the wrong time -- it needs to
happen before annotation processing
That being said, I think we do need a check, but maybe much sooner after
we Attr the name. This morning it occurred to me that the check should
be to conpare the declared type of the receiver parameter with the type
of the name expression.
Does that make sense? If so, I'll go ahead and add the check, and
restore the appropriate diags examples, etc.
-- Jon
More information about the type-annotations-dev
mailing list