mcimadamore@80: /* mcimadamore@80: * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. mcimadamore@80: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@80: * mcimadamore@80: * This code is free software; you can redistribute it and/or modify it mcimadamore@80: * under the terms of the GNU General Public License version 2 only, as mcimadamore@80: * published by the Free Software Foundation. mcimadamore@80: * mcimadamore@80: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@80: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@80: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@80: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@80: * accompanied this code). mcimadamore@80: * mcimadamore@80: * You should have received a copy of the GNU General Public License version mcimadamore@80: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@80: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@80: * mcimadamore@80: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, mcimadamore@80: * CA 95054 USA or visit www.sun.com if you need additional information or mcimadamore@80: * have any questions. mcimadamore@80: */ mcimadamore@80: mcimadamore@80: /** mcimadamore@80: * @test mcimadamore@80: * @bug 6717241 mcimadamore@80: * @summary some diagnostic argument is prematurely converted into a String object mcimadamore@80: * @author Maurizio Cimadamore mcimadamore@80: * @compile/fail/ref=T6717241a.out -XDstdout -XDrawDiagnostics T6717241a.java mcimadamore@80: */ mcimadamore@80: mcimadamore@80: class T6717241a { mcimadamore@80: X x; mcimadamore@80: void test() { mcimadamore@80: //this will generate a 'cant.resolve' mcimadamore@80: Object o = x.v; mcimadamore@80: //this will generate a 'cant.resolve.args' mcimadamore@80: x.m1(1, ""); mcimadamore@80: //this will generate a 'cant.resolve.args.params' mcimadamore@80: x.m2(1, ""); mcimadamore@80: } mcimadamore@80: }