langtools/test/tools/javac/cast/6548436/T6548436d.java
author sogoel
Thu, 05 Jun 2014 10:44:38 -0700
changeset 24796 f940af3221e2
parent 7681 1f0819a3341f
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:
1530
0cb573a51f92 6548436: Incorrect inconvertible types error
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: 7681
diff changeset
     2
 * @test /nodynamiccopyright/
f940af3221e2 8044064: Group 1: create .out files for cast and capture negative tests in tools/javac dir
sogoel
parents: 7681
diff changeset
     3
 * @bug  6548436
1530
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
     4
 * @summary Incorrect inconvertible types error
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
     5
 * @author Maurizio Cimadamore
0cb573a51f92 6548436: Incorrect inconvertible types error
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: 7681
diff changeset
     7
 * @compile/fail/ref=T6548436d.out -XDrawDiagnostics  T6548436d.java
1530
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
     8
 */
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
     9
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
    10
public class T6548436d {
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
    11
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
    12
    static class Base<E extends Comparable<E>> {}
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
    13
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
    14
    static void test(Base<? extends Double> je) {
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
    15
        Object o = (Base<Integer>)je;
0cb573a51f92 6548436: Incorrect inconvertible types error
mcimadamore
parents:
diff changeset
    16
    }
5213
6efe8a6d26eb 6933914: fix missing newlines
jjg
parents: 1530
diff changeset
    17
}