NameOrder.java revision 513:235135d61974
1264790Sbapt/* 2264790Sbapt * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. 3264790Sbapt * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4264790Sbapt * 5264790Sbapt * This code is free software; you can redistribute it and/or modify it 6264790Sbapt * under the terms of the GNU General Public License version 2 only, as 7264790Sbapt * published by the Free Software Foundation. 8264790Sbapt * 9264790Sbapt * This code is distributed in the hope that it will be useful, but WITHOUT 10264790Sbapt * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11264790Sbapt * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12264790Sbapt * version 2 for more details (a copy is included in the LICENSE file that 13264790Sbapt * accompanied this code). 14264790Sbapt * 15264790Sbapt * You should have received a copy of the GNU General Public License version 16264790Sbapt * 2 along with this work; if not, write to the Free Software Foundation, 17264790Sbapt * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18264790Sbapt * 19264790Sbapt * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 20264790Sbapt * CA 95054 USA or visit www.sun.com if you need additional information or 21264790Sbapt * have any questions. 22264790Sbapt */ 23264790Sbapt 24264790Sbapt/* 25264790Sbapt * @test 26264790Sbapt * @bug 4851006 27264790Sbapt * @summary generics: type inference failure due to a bug in ClassSymbol.isLess 28264790Sbapt * @author gafter 29264790Sbapt * 30264790Sbapt * @compile NameOrder.java 31264790Sbapt */ 32264790Sbapt 33264790Sbaptpackage NameOrder; 34264790Sbapt 35264790Sbaptinterface a {} 36264790Sbaptinterface b {} 37264790Sbaptinterface c {} 38264790Sbapt 39264790Sbaptclass A implements a, b {} 40264790Sbaptclass B implements c, a {} 41264790Sbapt 42264790Sbapt// this is how to trigger a symptom: 43264790Sbaptabstract class C { 44264790Sbapt <T> T f(T t1, T t2) { return null; } 45264790Sbapt void g() { 46264790Sbapt a x = f( new A(), new B() ); 47264790Sbapt } 48264790Sbapt} 49264790Sbapt