author | mcimadamore |
Fri, 30 May 2008 10:42:43 +0100 | |
changeset 660 | 16c478b6af1d |
child 5520 | 86e4b9a9da40 |
permissions | -rw-r--r-- |
660
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
1 |
/* |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
2 |
* Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
4 |
* |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
8 |
* |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
13 |
* accompanied this code). |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
14 |
* |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
18 |
* |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
19 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
20 |
* CA 95054 USA or visit www.sun.com if you need additional information or |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
21 |
* have any questions. |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
22 |
*/ |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
23 |
|
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
24 |
/* |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
25 |
* @test |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
26 |
* @bug 6507024 |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
27 |
* @summary unchecked conversion between arrays fails after capture conversion |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
28 |
* @author Maurizio Cimadamore |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
29 |
* |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
30 |
* @compile T6507024.java |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
31 |
*/ |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
32 |
|
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
33 |
public class T6507024<T> { |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
34 |
<Z> void m(T6507024<Z>[] results) { |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
35 |
T6507024<Z>[] r = results.getClass().cast(null); |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
36 |
} |
16c478b6af1d
6507024: casting an array to a generic type results in a 'capture#69 of ?' type error
mcimadamore
parents:
diff
changeset
|
37 |
} |