author | hseigel |
Wed, 02 Mar 2016 23:48:41 +0000 | |
changeset 36397 | c487ced7231c |
parent 24796 | f940af3221e2 |
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 |
} |