jjg@1755: /* jjg@1755: * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. jjg@1755: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jjg@1755: * jjg@1755: * This code is free software; you can redistribute it and/or modify it jjg@1755: * under the terms of the GNU General Public License version 2 only, as jjg@1755: * published by the Free Software Foundation. jjg@1755: * jjg@1755: * This code is distributed in the hope that it will be useful, but WITHOUT jjg@1755: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jjg@1755: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jjg@1755: * version 2 for more details (a copy is included in the LICENSE file that jjg@1755: * accompanied this code). jjg@1755: * jjg@1755: * You should have received a copy of the GNU General Public License version jjg@1755: * 2 along with this work; if not, write to the Free Software Foundation, jjg@1755: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jjg@1755: * jjg@1755: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jjg@1755: * or visit www.oracle.com if you need additional information or have any jjg@1755: * questions. jjg@1755: */ jjg@1755: jjg@1755: import java.lang.annotation.*; jjg@1755: jjg@1755: /* jjg@1755: * @test jjg@1755: * @bug 1234567 jjg@1755: * @summary new type annotation location: anonymous class creation jjg@1755: * @author Werner Dietl jjg@1755: * @compile AnonymousClass.java jjg@1755: */ jjg@1755: class AnonymousClass { jjg@1755: Object o1 = new @TA Object() { }; emc@2168: Object o2 = new @TA Object() { }; jjg@1755: } jjg@1755: jjg@1755: @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) jjg@1755: @interface TA { } jjg@1755: jjg@1755: @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) jjg@1755: @interface TB { }