BrokenEnumConstructor.java revision 3661:39b3a85da6af
1193323Sed/*
2193323Sed * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
3193323Sed * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4193323Sed *
5193323Sed * This code is free software; you can redistribute it and/or modify it
6193323Sed * under the terms of the GNU General Public License version 2 only, as
7193323Sed * published by the Free Software Foundation.
8193323Sed *
9193323Sed * This code is distributed in the hope that it will be useful, but WITHOUT
10193323Sed * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11193323Sed * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12193323Sed * version 2 for more details (a copy is included in the LICENSE file that
13193323Sed * accompanied this code).
14193323Sed *
15193323Sed * You should have received a copy of the GNU General Public License version
16193323Sed * 2 along with this work; if not, write to the Free Software Foundation,
17193323Sed * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18193323Sed *
19193323Sed * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20296417Sdim * or visit www.oracle.com if you need additional information or have any
21249423Sdim * questions.
22276479Sdim */
23249423Sdim
24193323Sed/*
25288943Sdim * @test
26249423Sdim * @bug 8047347
27193323Sed * @summary Verify that an explicit (incorrect) super constructor invocation in enums is not cleared
28193323Sed *          by JavacProcessingEnvironment
29276479Sdim * @library /tools/javac/lib
30276479Sdim * @modules jdk.compiler
31193323Sed * @build JavacTestingAbstractProcessor OnDemandAttribution
32193323Sed * @compile/process/fail/ref=BrokenEnumConstructor.out -XDrawDiagnostics -processor OnDemandAttribution BrokenEnumConstructor.java
33193323Sed */
34193323Sed
35193323Sedpublic enum BrokenEnumConstructor {
36193323Sed
37193323Sed    A;
38198090Srdivacky
39193323Sed    BrokenEnumConstructor() {super(); /*illegal*/}
40218893Sdim}
41218893Sdim