913N/A/*
913N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
913N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
913N/A *
913N/A * This code is free software; you can redistribute it and/or modify it
913N/A * under the terms of the GNU General Public License version 2 only, as
913N/A * published by the Free Software Foundation.
913N/A *
913N/A * This code is distributed in the hope that it will be useful, but WITHOUT
913N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
913N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
913N/A * version 2 for more details (a copy is included in the LICENSE file that
913N/A * accompanied this code).
913N/A *
913N/A * You should have received a copy of the GNU General Public License version
913N/A * 2 along with this work; if not, write to the Free Software Foundation,
913N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
913N/A *
913N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
913N/A * or visit www.oracle.com if you need additional information or have any
913N/A * questions.
913N/A */
913N/A
913N/A/*
913N/A * @test
913N/A * @bug 6939620 6894753 7020044
913N/A *
913N/A * @summary Diamond and subtyping
913N/A * @author mcimadamore
913N/A * @compile Pos06.java
913N/A *
913N/A */
913N/A
913N/Aclass Pos06 {
913N/A static class Foo<X> {
913N/A Foo(X x) { }
913N/A }
913N/A
913N/A static class DoubleFoo<X,Y> {
913N/A DoubleFoo(X x,Y y) { }
913N/A }
913N/A
913N/A static class TripleFoo<X,Y,Z> {
913N/A TripleFoo(X x,Y y,Z z) { }
913N/A }
913N/A
913N/A Foo<? extends Integer> fi = new Foo<>(1);
913N/A Foo<?> fw = new Foo<>(fi);
913N/A Foo<? extends Double> fd = new Foo<>(3.0);
913N/A DoubleFoo<?,?> dw = new DoubleFoo<>(fi,fd);
913N/A Foo<String> fs = new Foo<>("one");
913N/A TripleFoo<?,?,?> tw = new TripleFoo<>(fi,fd,fs);
913N/A}