author | sogoel |
Thu, 05 Jun 2014 10:44:38 -0700 | |
changeset 24796 | f940af3221e2 |
parent 5520 | 86e4b9a9da40 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
24796
f940af3221e2
8044064: Group 1: create .out files for cast and capture negative tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 5064736 |
4 |
* @summary Incompatible types are cast without error |
|
24796
f940af3221e2
8044064: Group 1: create .out files for cast and capture negative tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
5 |
* @compile/fail/ref=T5064736.out -XDrawDiagnostics T5064736.java |
10 | 6 |
*/ |
7 |
||
8 |
public class T5064736 { |
|
9 |
class A {} |
|
10 |
class B extends A {} |
|
11 |
||
12 |
public class Foo<T> { |
|
13 |
public <U extends B> void foo(Foo<? super A> param) { |
|
14 |
Foo<U> foo = (Foo<U>)param; |
|
15 |
} |
|
16 |
} |
|
17 |
} |