File: WildCardCrash.java

package info (click to toggle)
checker-framework-java 3.2.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,104 kB
  • sloc: java: 145,916; xml: 839; sh: 518; makefile: 404; perl: 26
file content (48 lines) | stat: -rw-r--r-- 1,787 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
public class WildCardCrash {}

abstract class AbstractTransfer123<
                IndexStore extends CFAbstractStore123<CFValue123, IndexStore>,
                MySelf extends AbstractTransfer123<IndexStore, MySelf>>
        extends CFAbstractTransfer123<CFValue123, IndexStore, MySelf> {
    void method() {
        // There was a crash when checking the assignment of analysis to the formal parameter.
        SomeGen<IndexStore> rfi = new SomeGen<>(analysis);
    }
}

class SomeGen<IndexStore extends Store123<IndexStore>> {
    public SomeGen(CFAbstractAnalysis123<CFValue123, ?, ?> analysis) {}
}

class CFValue123 extends CFAbstractValue123<CFValue123> {}

@SuppressWarnings("initialization")
class CFAbstractTransfer123<
                V extends CFAbstractValue123<V>,
                S extends CFAbstractStore123<V, S>,
                T extends CFAbstractTransfer123<V, S, T>>
        implements TransferFunction123<V, S> {
    protected CFAbstractAnalysis123<V, S, T> analysis;
}

class CFAbstractValue123<V extends CFAbstractValue123<V>> implements AbstractValue123<V> {}

class CFAbstractStore123<V extends CFAbstractValue123<V>, S extends CFAbstractStore123<V, S>>
        implements Store123<S> {}

abstract class CFAbstractAnalysis123<
                V extends CFAbstractValue123<V>,
                S extends CFAbstractStore123<V, S>,
                T extends CFAbstractTransfer123<V, S, T>>
        extends Analysis123<V, S, T> {}

interface AbstractValue123<V extends AbstractValue123<V>> {}

interface Store123<T extends Store123<T>> {}

interface TransferFunction123<A extends AbstractValue123<A>, S extends Store123<S>> {}

class Analysis123<
        A extends AbstractValue123<A>,
        S extends Store123<S>,
        T extends TransferFunction123<A, S>> {}