langtools/test/tools/javac/generics/CastCrash.java
author lana
Tue, 25 Apr 2017 07:38:50 +0000
changeset 44909 b53c770dc04f
parent 30718 391eff0516a6
permissions -rw-r--r--
Added tag jdk-10+1 for changeset 3a409afd3f86
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
30718
391eff0516a6 8074502: Group 13c: golden files for tests in tools/javac/generics dir
sogoel
parents: 5520
diff changeset
     2
 * @test /nodynamiccopyright/
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * @bug 5025346
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 * @summary Crash on cast
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * @author gafter
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 *
30718
391eff0516a6 8074502: Group 13c: golden files for tests in tools/javac/generics dir
sogoel
parents: 5520
diff changeset
     7
 * @compile/fail/ref=CastCrash.out -XDrawDiagnostics  CastCrash.java
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
package cast.crash;
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
import java.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
interface SN extends Set<Number>{}
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
interface LI extends List<Integer>{}
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
class CastCrash {
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
    void f(LI l) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
        SN sn = (SN) l;
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
}