Pos07.java revision 913:ca32f2986301
1103442Smini/* 2103442Smini * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 3103442Smini * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4103442Smini * 5103442Smini * This code is free software; you can redistribute it and/or modify it 6103442Smini * under the terms of the GNU General Public License version 2 only, as 7103442Smini * published by the Free Software Foundation. 8103442Smini * 9103442Smini * This code is distributed in the hope that it will be useful, but WITHOUT 10103442Smini * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11103442Smini * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12103442Smini * version 2 for more details (a copy is included in the LICENSE file that 13103442Smini * accompanied this code). 14103442Smini * 15103442Smini * You should have received a copy of the GNU General Public License version 16103442Smini * 2 along with this work; if not, write to the Free Software Foundation, 17103442Smini * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18103442Smini * 19103442Smini * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20103442Smini * or visit www.oracle.com if you need additional information or have any 21103442Smini * questions. 22103442Smini */ 23103442Smini 24103442Smini/* 25103442Smini * @test 26103442Smini * @bug 6939620 6894753 7020044 27103442Smini * 28125668Scperciva * @summary Diamond and intersection types 29103442Smini * @author mcimadamore 30103442Smini * @compile Pos07.java 31103442Smini * 32103442Smini */ 33103442Smini 34103769Sminiclass Pos07 { 35111010Snectar static class Foo<X extends Number & Comparable<Number>> {} 36103442Smini static class DoubleFoo<X extends Number & Comparable<Number>, 37103443Smini Y extends Number & Comparable<Number>> {} 38103443Smini static class TripleFoo<X extends Number & Comparable<Number>, 39103442Smini Y extends Number & Comparable<Number>, 40103442Smini Z> {} 41103442Smini 42103443Smini Foo<?> fw = new Foo<>(); 43103442Smini DoubleFoo<?,?> dw = new DoubleFoo<>(); 44103769Smini TripleFoo<?,?,?> tw = new TripleFoo<>(); 45103442Smini} 46103442Smini