test/tools/javap/output/RepeatingTypeAnnotations.java

changeset 1721
abd153854f16
parent 1643
1f8c28134ffc
child 1755
ddb4a2bfcd82
equal deleted inserted replaced
1717:8e27e84de2e9 1721:abd153854f16
119 * - two annotation types with different retention 119 * - two annotation types with different retention
120 * - three annotation types, two of same retention, one different. 120 * - three annotation types, two of same retention, one different.
121 */ 121 */
122 122
123 @TestCase 123 @TestCase
124 @ignore // 8008082:missing type annotation for cast 124 @ignore // 8008082: missing type annotation for cast
125 public static class TC1 extends RepeatingTypeAnnotations { 125 public static class TC1 extends RepeatingTypeAnnotations {
126 public TC1() { 126 public TC1() {
127 setSrc(" static String so = \"hello world\";", 127 setSrc(" static String so = \"hello world\";",
128 " public @A @A @A Object o = (@A @A @A String) Test.so;"); 128 " public @A @A @A Object o = (@A @A @A String) Test.so;");
129 verify("RuntimeInvisibleTypeAnnotations", 129 verify("RuntimeInvisibleTypeAnnotations",
174 "3: #27(): CAST, offset=5"); 174 "3: #27(): CAST, offset=5");
175 } 175 }
176 } 176 }
177 177
178 @TestCase 178 @TestCase
179 @ignore // 8008082:missing type annotation for cast 179 @ignore // 8008082: missing type annotation for cast
180 public static class TC5 extends RepeatingTypeAnnotations { 180 public static class TC5 extends RepeatingTypeAnnotations {
181 public TC5() { 181 public TC5() {
182 setSrc(" static String so = \"hello world\";", 182 setSrc(" static String so = \"hello world\";",
183 " public static @A @A @A Object o = (@B @B @B String) Test.so;"); 183 " public static @A @A @A Object o = (@B @B @B String) Test.so;");
184 verify("RuntimeInvisibleTypeAnnotations", 184 verify("RuntimeInvisibleTypeAnnotations",
229 "3: #27(): CAST, offset=5"); 229 "3: #27(): CAST, offset=5");
230 } 230 }
231 } 231 }
232 232
233 @TestCase 233 @TestCase
234 @ignore // 8008082:missing type annotation for cast 234 @ignore // 8008082: missing type annotation for cast
235 public static class TC9 extends RepeatingTypeAnnotations { 235 public static class TC9 extends RepeatingTypeAnnotations {
236 public TC9() { 236 public TC9() {
237 setSrc(" public Test(@A @A @A Object o, @A int i, long l) {", 237 setSrc(" public Test(@A @A @A Object o, @A int i, long l) {",
238 " @A @A @A String ls = (@B @B @B String) o;", 238 " @A @A @A String ls = (@B @B @B String) o;",
239 " }"); 239 " }");
303 "6: #37(): LOCAL_VARIABLE, {start_pc=10, length=1, index=5}"); 303 "6: #37(): LOCAL_VARIABLE, {start_pc=10, length=1, index=5}");
304 } 304 }
305 } 305 }
306 306
307 @TestCase 307 @TestCase
308 @ignore // 8008082:missing type annotation for cast 308 @ignore // 8008082: missing type annotation for cast
309 public static class TC13 extends RepeatingTypeAnnotations { 309 public static class TC13 extends RepeatingTypeAnnotations {
310 public TC13() { 310 public TC13() {
311 setSrc(" public @A @A @A String foo(@A @A @A Object o, @A int i, long l) {", 311 setSrc(" public @A @A @A String foo(@A @A @A Object o, @A int i, long l) {",
312 " @A @A @A String ls = (@B @B @B String) o;", 312 " @A @A @A String ls = (@B @B @B String) o;",
313 " return (@A @A @A String) o;", 313 " return (@A @A @A String) o;",

mercurial