Request for comments: type annotations on nested types
Werner Dietl
wdietl at gmail.com
Sun Jun 16 16:06:17 PDT 2013
Dear all,
I've been working on type annotations on nested types and want to make
sure I'm implementing the right checks.
Find three test classes attached that should contain all legal
combinations of nesting of types.
Instead of a .out file, see "// err" markers for the lines that I expect errors.
CantAnnotateStaticClass.java contains only legal combinations; see
tests 2 and 3 for error cases.
My interpretation is basically that, if it is possible to refer to a
"Outer.this" object, it should be possible to have a type annotation
on that type use.
Does everybody agree with this interpretation?
Do you see any errors in my test cases?
Do you see a way to write the test cases in a more succinct and complete way?
I have a few local changes that refactor this part of the compiler.
I'll push once we agree on the checks.
Thanks for all comments!
cu, WMD.
--
http://www.google.com/profiles/wdietl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CantAnnotateStaticClass.java
Type: application/octet-stream
Size: 2707 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/type-annotations-dev/attachments/20130616/75c466d5/CantAnnotateStaticClass.java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CantAnnotateStaticClass2.java
Type: application/octet-stream
Size: 6566 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/type-annotations-dev/attachments/20130616/75c466d5/CantAnnotateStaticClass2.java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CantAnnotateStaticClass3.java
Type: application/octet-stream
Size: 6686 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/type-annotations-dev/attachments/20130616/75c466d5/CantAnnotateStaticClass3.java
More information about the type-annotations-dev
mailing list