Clarification for CantAnnotateStaticClass2 test
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.
and the ensuing rules in JLS8 9.7.4 about an "admissible" type annotation.
On 5/8/2014 4:06 PM, Eric McCorkle wrote:
> 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?
More information about the compiler-dev