T6806876.java revision 355
355N/A/*
355N/A * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
355N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
355N/A *
355N/A * This code is free software; you can redistribute it and/or modify it
355N/A * under the terms of the GNU General Public License version 2 only, as
355N/A * published by the Free Software Foundation.
355N/A *
355N/A * This code is distributed in the hope that it will be useful, but WITHOUT
355N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
355N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
355N/A * version 2 for more details (a copy is included in the LICENSE file that
355N/A * accompanied this code).
355N/A *
355N/A * You should have received a copy of the GNU General Public License version
355N/A * 2 along with this work; if not, write to the Free Software Foundation,
355N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
355N/A *
355N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
355N/A * CA 95054 USA or visit www.sun.com if you need additional information or
355N/A * have any questions.
355N/A */
355N/A
355N/A/*
355N/A * @test
355N/A * @bug 6806876
355N/A * @author mcimadamore
355N/A * @summary ClassCastException occurs in assignment expressions without any heap pollutions
355N/A * @compile/fail/ref=T6806876.out -Xlint:unchecked -Werror -XDrawDiagnostics T6806876.java
355N/A */
355N/A
355N/Aclass T6806876 {
355N/A void test(Integer i, Long l) {
355N/A Comparable<?>[] res = m(i, l);
355N/A }
355N/A
355N/A <T> T[] m(T...a) {
355N/A return null;
355N/A }
355N/A}