[JSR308] Receiver on field initializers
mahmood at MIT.EDU
Sun May 11 13:03:11 EDT 2008
On May 11, 2008, at 11:56 AM, Artemus Harper wrote:
> So all that is probably needed is a warning of where it is valid to
> call the getReceiver method.
It is valid to call getReceiver() as you called it, and it was a bug
in getReceiver() to throw an exception. This is corrected now and
will be visible in the following release. However, it is highly
recommended that you only query the particular node as you visit it
not ahead of time!
> On a side note, would it be possible to have a way to enable type
> compatibility when constructors are called, currently it seems that
> the constructor is always skipped.
Can you please elaborate? The framework currently checks arguments
passed to the constructor for valid subtyping. No subtype rules are
specified for constructors invocation (unlike other method invocations).
If that does not happen, please make sure that you have the most
updated version of the checkers.
It might be very helpful in the future to include your code, the
expected results, and the actual results.
> As for the problem with the field annotations, I currently have a
> temporary 'hack' that collects the constructor annotations, and sees
> if the one I'm interested in is in one of those.
We would appreciate it, if you explain what your goals/type system
rules are, to see if the framework should provide a better interface!
Also, you would like you to use the documentations specified, and send
any comments on where you might find the javadocs lacking/obscure.
More information about the JSR308