Newarg1.java revision 288:84061bd68019
129088Smarkm/*
229088Smarkm * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
329088Smarkm * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
429088Smarkm *
529088Smarkm * This code is free software; you can redistribute it and/or modify it
629088Smarkm * under the terms of the GNU General Public License version 2 only, as
729088Smarkm * published by the Free Software Foundation.
829088Smarkm *
929088Smarkm * This code is distributed in the hope that it will be useful, but WITHOUT
1029088Smarkm * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1129088Smarkm * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1229088Smarkm * version 2 for more details (a copy is included in the LICENSE file that
1329088Smarkm * accompanied this code).
1429088Smarkm *
1529088Smarkm * You should have received a copy of the GNU General Public License version
1629088Smarkm * 2 along with this work; if not, write to the Free Software Foundation,
1729088Smarkm * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1829088Smarkm *
1929088Smarkm * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
2029088Smarkm * CA 95054 USA or visit www.sun.com if you need additional information or
2129088Smarkm * have any questions.
2229088Smarkm */
2329088Smarkm
2429088Smarkm/*
2529088Smarkm * @test
2629088Smarkm * @bug 4851039
2729088Smarkm * @summary explicit type arguments
2829088Smarkm * @author gafter
2929088Smarkm *
3029088Smarkm * @compile/fail  Newarg1.java
3129088Smarkm */
3229088Smarkm
3329088Smarkm// Test type mismatch on type argument for constructor
34114630Sobrien
3529088Smarkmclass T<X> {
3629181Smarkm
3763248Speter    <K> T(K x) {
38114630Sobrien    }
39114630Sobrien
40114630Sobrien    public static void main(String[] args) {
4129088Smarkm        new <Integer>T<Float>("");
4229088Smarkm    }
4329088Smarkm}
4429088Smarkm