-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathA.java
More file actions
44 lines (36 loc) · 794 Bytes
/
A.java
File metadata and controls
44 lines (36 loc) · 794 Bytes
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
package dependency;
public class A<T> {
}
class B {
}
class C {
A<B> b;
C[] c;
}
class D extends A<B> {
class E {
C m(A<F> f) throws G {
return null;
}
}
}
class F { }
class G extends Throwable { }
class H {
<T extends String> T test(T t) { return t; }
void test2(java.util.Collection<? extends Number> t) {}
void test3(Object o) {
if (o instanceof Used1) return;
switch (o) {
case Used2 u2: break;
default: break;
}
var x = switch (o) {
case Used3 u3: yield 1;
default: yield 2;
};
}
static class Used1 { }
static class Used2 { }
static class Used3 { }
}