test/tools/javac/tree/T6923080.java

Tue, 28 Dec 2010 15:54:52 -0800

author
ohair
date
Tue, 28 Dec 2010 15:54:52 -0800
changeset 798
4868a36f6fd8
parent 554
9d9f26857129
child 2525
2eb010b6cb22
permissions
-rw-r--r--

6962318: Update copyright year
Reviewed-by: xdono

jjg@489 1 /*
ohair@554 2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
jjg@489 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jjg@489 4 *
jjg@489 5 * This code is free software; you can redistribute it and/or modify it
jjg@489 6 * under the terms of the GNU General Public License version 2 only, as
jjg@489 7 * published by the Free Software Foundation.
jjg@489 8 *
jjg@489 9 * This code is distributed in the hope that it will be useful, but WITHOUT
jjg@489 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jjg@489 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jjg@489 12 * version 2 for more details (a copy is included in the LICENSE file that
jjg@489 13 * accompanied this code).
jjg@489 14 *
jjg@489 15 * You should have received a copy of the GNU General Public License version
jjg@489 16 * 2 along with this work; if not, write to the Free Software Foundation,
jjg@489 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jjg@489 18 *
ohair@554 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@554 20 * or visit www.oracle.com if you need additional information or have any
ohair@554 21 * questions.
jjg@489 22 */
jjg@489 23
jjg@489 24 /*
jjg@489 25 * This file is not a regular test, but is processed by ./TreeScannerTest.java,
jjg@489 26 * which verifies the operation of the javac TreeScanner.
jjg@489 27 * @bug 6923080
jjg@489 28 * @summary TreeScanner.visitNewClass should scan tree.typeargs
jjg@489 29 */
jjg@489 30 class T6923080 {
jjg@489 31 void test() {
jjg@489 32 C c = new <Integer>C(); // exercises TreeScanner.visitNewClass
jjg@489 33 Object o = c.<Float>m(); // exercises TreeScanner.visitApply
jjg@489 34 }
jjg@489 35
jjg@489 36 static class C {
jjg@489 37 <T> C() { }
jjg@489 38 <T> T m() { return null; }
jjg@489 39 }
jjg@489 40 }

mercurial