T5081785.java revision 553
405N/A/*
405N/A * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
405N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
405N/A *
405N/A * This code is free software; you can redistribute it and/or modify it
405N/A * under the terms of the GNU General Public License version 2 only, as
405N/A * published by the Free Software Foundation.
405N/A *
405N/A * This code is distributed in the hope that it will be useful, but WITHOUT
405N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
405N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
405N/A * version 2 for more details (a copy is included in the LICENSE file that
405N/A * accompanied this code).
405N/A *
405N/A * You should have received a copy of the GNU General Public License version
405N/A * 2 along with this work; if not, write to the Free Software Foundation,
405N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
405N/A *
405N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
405N/A * or visit www.oracle.com if you need additional information or have any
405N/A * questions.
405N/A */
405N/A
405N/A/*
405N/A * @test
405N/A * @bug 5081785
405N/A *
405N/A * @summary Empty Enums allowed in non-static contexts
405N/A * @author Peter von der Ah\u00e9
405N/A *
405N/A * @compile/fail T5081785.java
405N/A * @compile/fail T5081785a.java
405N/A * @compile/fail T5081785b.java
405N/A * @compile/fail T5081785c.java
405N/A */
405N/A
405N/Aclass A {
405N/A public void check() {
405N/A class Foo {
405N/A enum STRENGTH{};
405N/A };
405N/A }
405N/A}
405N/A