Clarification for CantAnnotateStaticClass2 test
Alex Buckley
alex.buckley at oracle.com
Thu May 8 23:19:41 UTC 2014
Good question, but the test is correct in not expecting an error from f1a.
See
http://mail.openjdk.java.net/pipermail/type-annotations-spec-observers/2013-October/000198.html
and the ensuing rules in JLS8 9.7.4 about an "admissible" type annotation.
Alex
On 5/8/2014 4:06 PM, Eric McCorkle wrote:
> Hello,
>
> In the test CantAnnotateStaticClass2, the following lines appear.
>
>
> @TB Outer f1;
> @TB Outer.Inner f1a;
> @TB Outer.SInner f2a; // err
> @TB Outer.IInner f3a; // err
>
> In the second line, TB annotates a static class from which a member is
> being selected, which should result in an error, but the test does not
> expect an error message. Should there, in fact, be an error message?
>
> Thanks,
> Eric
>
More information about the compiler-dev
mailing list