langtools/test/tools/javac/capture/Martin.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:
10
06bc494ca11e Initial load
duke
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/
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * @bug     6384510
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 * @summary improper handling of wildcard captures
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * @author  Martin Buchholz
24796
f940af3221e2 8044064: Group 1: create .out files for cast and capture negative tests in tools/javac dir
sogoel
parents: 5520
diff changeset
     6
 * @compile/fail/ref=Martin.out -XDrawDiagnostics  Martin.java
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
import java.util.List;
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
public class Martin {
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
    public static void main(String[] args) throws Throwable {
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
        List<?> x1 = null;
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
        List<?> x2 = null;
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
        x1.addAll(x2);
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
}