langtools/test/tools/javac/capture/T6594284.java
author sogoel
Thu, 05 Jun 2014 10:44:38 -0700
changeset 24796 f940af3221e2
parent 5520 86e4b9a9da40
permissions -rw-r--r--
8044064: Group 1: create .out files for cast and capture negative tests in tools/javac dir Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
}