author | sogoel |
Fri, 29 Aug 2014 00:42:42 -0700 | |
changeset 26274 | 02a5b23ee21c |
parent 24796 | f940af3221e2 |
permissions | -rw-r--r-- |
938
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
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/ |
938
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
3 |
* @bug 6594284 |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
4 |
* @summary NPE thrown when calling a method on an intersection type |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
5 |
* @author Maurizio Cimadamore |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
6 |
* |
24796
f940af3221e2
8044064: Group 1: create .out files for cast and capture negative tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=T6594284.out -XDrawDiagnostics T6594284.java |
938
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
8 |
*/ |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
9 |
|
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
10 |
public class T6594284 { |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
11 |
class A{ public void a(){}} |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
12 |
class B extends A{ public void b(){}} |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
13 |
interface I{ void i();} |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
14 |
interface I1 { void i1(); } |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
15 |
class E extends B implements I{ public void i(){};} |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
16 |
|
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
17 |
class C<W extends B & I1, T extends W>{ |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
18 |
C<? extends I, ? extends E> arg; |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
19 |
} |
13aae74ca013
6594284: NPE thrown when calling a method on an intersection type
mcimadamore
parents:
diff
changeset
|
20 |
} |