vromero@2548: /* vromero@2548: * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. vromero@2548: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. vromero@2548: * vromero@2548: * This code is free software; you can redistribute it and/or modify it vromero@2548: * under the terms of the GNU General Public License version 2 only, as vromero@2548: * published by the Free Software Foundation. vromero@2548: * vromero@2548: * This code is distributed in the hope that it will be useful, but WITHOUT vromero@2548: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or vromero@2548: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License vromero@2548: * version 2 for more details (a copy is included in the LICENSE file that vromero@2548: * accompanied this code). vromero@2548: * vromero@2548: * You should have received a copy of the GNU General Public License version vromero@2548: * 2 along with this work; if not, write to the Free Software Foundation, vromero@2548: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. vromero@2548: * vromero@2548: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA vromero@2548: * or visit www.oracle.com if you need additional information or have any vromero@2548: * questions. vromero@2548: */ vromero@2548: vromero@2548: /* vromero@2548: * @test vromero@2548: * @bug 8051402 vromero@2548: * @summary javac, type containment should accept that CAP <= ? extends CAP and CAP <= ? super CAP vromero@2548: * @compile WildcardAndCAPSubtypeTest.java vromero@2548: */ vromero@2548: vromero@2548: import java.util.List; vromero@2548: vromero@2548: public abstract class WildcardAndCAPSubtypeTest { vromero@2548: abstract List copyOf(List lx); vromero@2548: abstract List filter(List lx); vromero@2548: vromero@2548: void g(List lx) { vromero@2548: copyOf(filter(lx)); vromero@2548: } vromero@2548: }