changeset 2343:5d8736d4de0b

Add test cases for constructors on nested classes.
author wmdietl
date Wed, 20 Mar 2013 18:41:05 +0100
parents 546a979f9070
children 40f46df6ec3a
files test/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java
diffstat 1 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java	Wed Mar 20 18:40:43 2013 +0100
+++ b/test/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java	Wed Mar 20 18:41:05 2013 +0100
@@ -54,7 +54,6 @@
                " } }";
     }
 
-    /* TODO: Outer.this annotation support.
     @TADescriptions({
         @TADescription(annotation = "TA", type = METHOD_RECEIVER),
         @TADescription(annotation = "TB", type = METHOD_RETURN),
@@ -69,5 +68,21 @@
                " @TD Inner(@TC Test Test.this, @TE int b) {}" +
                " } }";
     }
-    */
+
+    @TADescriptions({
+        @TADescription(annotation = "TA", type = METHOD_RECEIVER),
+        @TADescription(annotation = "TB", type = METHOD_RECEIVER, genericLocation = {1, 0}),
+        @TADescription(annotation = "TC", type = METHOD_RETURN),
+        @TADescription(annotation = "TD", type = METHOD_RECEIVER, genericLocation = {1, 0}),
+        @TADescription(annotation = "TE", type = METHOD_RETURN),
+        @TADescription(annotation = "TF", type = METHOD_FORMAL_PARAMETER, paramIndex = 0)
+    })
+    @TestClass("Outer$Middle$Inner")
+    public String innerClass3() {
+        return "class Outer { class Middle { class Inner {" +
+               " @TC Inner(@TA Outer. @TB Middle Middle.this) {}" +
+               " @TE Inner(@TD Middle Outer.Middle.this, @TF int b) {}" +
+               " } } }";
+    }
+
 }