test/tools/javac/generics/6182950/T6182950a.java

Wed, 25 Mar 2009 10:28:36 +0000

author
mcimadamore
date
Wed, 25 Mar 2009 10:28:36 +0000
changeset 252
5caa6c45936a
child 384
ed31953ca025
permissions
-rw-r--r--

6182950: methods clash algorithm should not depend on return type
Summary: fixed code that checks for duplicate method declarations
Reviewed-by: jjg

mcimadamore@252 1 /*
mcimadamore@252 2 * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
mcimadamore@252 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@252 4 *
mcimadamore@252 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@252 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@252 7 * published by the Free Software Foundation.
mcimadamore@252 8 *
mcimadamore@252 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@252 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@252 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@252 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@252 13 * accompanied this code).
mcimadamore@252 14 *
mcimadamore@252 15 * You should have received a copy of the GNU General Public License version
mcimadamore@252 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@252 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@252 18 *
mcimadamore@252 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
mcimadamore@252 20 * CA 95054 USA or visit www.sun.com if you need additional information or
mcimadamore@252 21 * have any questions.
mcimadamore@252 22 */
mcimadamore@252 23
mcimadamore@252 24 /*
mcimadamore@252 25 * @test
mcimadamore@252 26 * @bug 6182950
mcimadamore@252 27 * @summary methods clash algorithm should not depend on return type
mcimadamore@252 28 * @author mcimadamore
mcimadamore@252 29 * @compile/fail/ref=T6182950a.out -XDrawDiagnostics T6182950a.java
mcimadamore@252 30 */
mcimadamore@252 31 import java.util.List;
mcimadamore@252 32
mcimadamore@252 33 class T6182950a {
mcimadamore@252 34 int m(List<String> l) {return 0;}
mcimadamore@252 35 double m(List<Integer> l) {return 0;}
mcimadamore@252 36 }

mercurial