test/tools/javac/diags/examples/ContainedByNoValue.java

Sat, 06 Oct 2012 10:35:38 +0100

author
mcimadamore
date
Sat, 06 Oct 2012 10:35:38 +0100
changeset 1352
d4b3cb1ece84
parent 1313
873ddd9f4900
permissions
-rw-r--r--

7177386: Add attribution support for method references
Summary: Add type-checking/lookup routines for method references
Reviewed-by: jjg, dlsmith

jfranck@1313 1 /*
jfranck@1313 2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
jfranck@1313 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jfranck@1313 4 *
jfranck@1313 5 * This code is free software; you can redistribute it and/or modify it
jfranck@1313 6 * under the terms of the GNU General Public License version 2 only, as
jfranck@1313 7 * published by the Free Software Foundation.
jfranck@1313 8 *
jfranck@1313 9 * This code is distributed in the hope that it will be useful, but WITHOUT
jfranck@1313 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jfranck@1313 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jfranck@1313 12 * version 2 for more details (a copy is included in the LICENSE file that
jfranck@1313 13 * accompanied this code).
jfranck@1313 14 *
jfranck@1313 15 * You should have received a copy of the GNU General Public License version
jfranck@1313 16 * 2 along with this work; if not, write to the Free Software Foundation,
jfranck@1313 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jfranck@1313 18 *
jfranck@1313 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jfranck@1313 20 * or visit www.oracle.com if you need additional information or have any
jfranck@1313 21 * questions.
jfranck@1313 22 */
jfranck@1313 23
jfranck@1313 24 // key: compiler.err.invalid.containedby.annotation.no.value
jfranck@1313 25
jfranck@1313 26 import java.lang.annotation.*;
jfranck@1313 27
jfranck@1313 28 @ContainedBy(Annos.class)
jfranck@1313 29 @interface Anno { }
jfranck@1313 30
jfranck@1313 31 @ContainerFor(Anno.class)
jfranck@1313 32 @interface Annos {}
jfranck@1313 33
jfranck@1313 34 @Anno
jfranck@1313 35 @Anno
jfranck@1313 36 class ContainedByNoValue { }

mercurial