langtools/test/tools/javac/generics/wildcards/6651719/T6651719b.java
author mcimadamore
Thu, 24 Jul 2008 10:35:38 +0100
changeset 937 457a11ae2e84
permissions -rw-r--r--
6651719: Compiler crashes possibly during forward reference of TypeParameter Summary: compiler should apply capture conversion when checking for bound conformance Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
937
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
     1
/*
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
     2
 * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
     4
 *
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
     7
 * published by the Free Software Foundation.
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
     8
 *
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    13
 * accompanied this code).
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    14
 *
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    18
 *
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    21
 * have any questions.
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    22
 */
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    23
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    24
/*
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    25
 * @test
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    26
 * @bug     6651719
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    27
 * @summary Compiler crashes possibly during forward reference of TypeParameter
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    28
 * @compile T6651719b.java
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    29
 */
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    30
import java.util.*;
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    31
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    32
public class T6651719b {
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    33
    <T> void m(T t, List<? super List<T>> list) {}
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    34
    void test(List<? super List<?>> list) {
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    35
        m("", list);
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    36
    }
457a11ae2e84 6651719: Compiler crashes possibly during forward reference of TypeParameter
mcimadamore
parents:
diff changeset
    37
}