Annotation cycles (was: repeating annotations)
Joel Borggrén-Franck
joel.franck at oracle.com
Wed Apr 18 00:20:40 PDT 2012
On 17 apr 2012, at 14:59, Jesse Glick wrote:
> On 03/11/2012 06:19 PM, Joe Darcy wrote:
>> two annotation types cannot be containers for each other because that would create an illegal cyclic annotation type situation
>
> So long as you are changing the language spec for annotations, why not fix this longstanding irritation too (#6264216), which arbitrarily prevents a rather wide range of use cases for annotations? For example, move the cycle check from declaration time to use time, so that the only rejected constructs would be genuinely nonterminating cycles that no one would ever intentionally write:
I suspect this change would be quite intrusive in implementation (while perhaps small in specification). The implementation of the current scheme for repeating annotations is both small and rather non-intrusive. Your proposition might (or might not) be a desirable feature, but it isn't an easy fix while doing repeating annotations.
cheers
/Joel
More information about the compiler-dev
mailing list