Thu, 23 Oct 2008 18:29:11 +0100
6557954: Inner class type parameters doesn't get substituted when checking type well-formedness
Summary: Validator.visitTypeApply should substitute all formal typevars with actual parameters
Reviewed-by: jjg
mcimadamore@80 | 1 | /* |
mcimadamore@80 | 2 | * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. |
mcimadamore@80 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
mcimadamore@80 | 4 | * |
mcimadamore@80 | 5 | * This code is free software; you can redistribute it and/or modify it |
mcimadamore@80 | 6 | * under the terms of the GNU General Public License version 2 only, as |
mcimadamore@80 | 7 | * published by the Free Software Foundation. |
mcimadamore@80 | 8 | * |
mcimadamore@80 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
mcimadamore@80 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
mcimadamore@80 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
mcimadamore@80 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
mcimadamore@80 | 13 | * accompanied this code). |
mcimadamore@80 | 14 | * |
mcimadamore@80 | 15 | * You should have received a copy of the GNU General Public License version |
mcimadamore@80 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
mcimadamore@80 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
mcimadamore@80 | 18 | * |
mcimadamore@80 | 19 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
mcimadamore@80 | 20 | * CA 95054 USA or visit www.sun.com if you need additional information or |
mcimadamore@80 | 21 | * have any questions. |
mcimadamore@80 | 22 | */ |
mcimadamore@80 | 23 | |
mcimadamore@80 | 24 | /** |
mcimadamore@80 | 25 | * @test |
mcimadamore@80 | 26 | * @bug 6717241 |
mcimadamore@80 | 27 | * @summary some diagnostic argument is prematurely converted into a String object |
mcimadamore@80 | 28 | * @author Maurizio Cimadamore |
mcimadamore@80 | 29 | * @compile/fail/ref=T6717241a.out -XDstdout -XDrawDiagnostics T6717241a.java |
mcimadamore@80 | 30 | */ |
mcimadamore@80 | 31 | |
mcimadamore@80 | 32 | class T6717241a<X extends Object & java.io.Serializable> { |
mcimadamore@80 | 33 | X x; |
mcimadamore@80 | 34 | void test() { |
mcimadamore@80 | 35 | //this will generate a 'cant.resolve' |
mcimadamore@80 | 36 | Object o = x.v; |
mcimadamore@80 | 37 | //this will generate a 'cant.resolve.args' |
mcimadamore@80 | 38 | x.m1(1, ""); |
mcimadamore@80 | 39 | //this will generate a 'cant.resolve.args.params' |
mcimadamore@80 | 40 | x.<Integer,Double>m2(1, ""); |
mcimadamore@80 | 41 | } |
mcimadamore@80 | 42 | } |