test/tools/javac/enum/T6509042.java

Mon, 29 Sep 2008 12:00:29 +0100

author
mcimadamore
date
Mon, 29 Sep 2008 12:00:29 +0100
changeset 122
1a9276e7cb18
parent 18
aeaa0f482b28
child 554
9d9f26857129
permissions
-rw-r--r--

6747671: -Xlint:rawtypes
Summary: add an Xlint option for detecting all raw types usages (ccc-approved)
Reviewed-by: jjg

mcimadamore@18 1 /*
mcimadamore@18 2 * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
mcimadamore@18 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@18 4 *
mcimadamore@18 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@18 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@18 7 * published by the Free Software Foundation.
mcimadamore@18 8 *
mcimadamore@18 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@18 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@18 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@18 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@18 13 * accompanied this code).
mcimadamore@18 14 *
mcimadamore@18 15 * You should have received a copy of the GNU General Public License version
mcimadamore@18 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@18 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@18 18 *
mcimadamore@18 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
mcimadamore@18 20 * CA 95054 USA or visit www.sun.com if you need additional information or
mcimadamore@18 21 * have any questions.
mcimadamore@18 22 */
mcimadamore@18 23
mcimadamore@18 24 /*
mcimadamore@18 25 * @test
mcimadamore@18 26 * @bug 6509042
mcimadamore@18 27 *
mcimadamore@18 28 * @summary javac rejects class literals in enum constructors
mcimadamore@18 29 * @author Maurizio Cimadamore
mcimadamore@18 30 *
mcimadamore@18 31 * @compile T6509042.java
mcimadamore@18 32 */
mcimadamore@18 33 enum T6509042 {
mcimadamore@18 34 A, B;
mcimadamore@18 35
mcimadamore@18 36 Class<T6509042> cl = T6509042.class;
mcimadamore@18 37
mcimadamore@18 38 T6509042() {
mcimadamore@18 39 Class<T6509042> cl2 = T6509042.class;
mcimadamore@18 40 }
mcimadamore@18 41 }

mercurial