Skip to content

Commit 552ab6f

Browse files
committed
Merge branch 'develop/1.12.0' into inline-instance-variable
2 parents 762f0fb + 0cdf73e commit 552ab6f

File tree

7 files changed

+474
-98
lines changed

7 files changed

+474
-98
lines changed

test/org/jetbrains/java/decompiler/SingleClassesTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@ private void registerDefault() {
794794
register(JAVA_8, "TestTryLoopReturnFinally");
795795
register(JASM, "TestNumberCompareToBoolean");
796796

797-
register(JAVA_25, "TestMethodReferenceJ25");
797+
register(JAVA_21, "TestMethodReferenceJ21", "ext/RefsExt");
798+
register(JAVA_25, "TestMethodReferenceJ25", "ext/RefsExt");
798799
}
799800

800801
private void registerEntireClassPath() {
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
package pkg;
2+
3+
import ext.RefsExt;
4+
import java.util.function.Consumer;
5+
6+
public class TestMethodReferenceJ21 extends RefsExt {
7+
private void test() {
8+
this.consume(this::accept);// 9
9+
}// 10
10+
11+
private void test_() {
12+
this.consume(s -> this.accept(s));// 13
13+
}// 14
14+
15+
private void test2() {
16+
this.consume(this::accept2);// 17
17+
}// 18
18+
19+
private void test3(TestMethodReferenceJ21 ref) {
20+
this.consume(ref::accept);// 21
21+
}// 22
22+
23+
private void test3_(TestMethodReferenceJ21 ref) {
24+
this.consume(ref::accept);// 25
25+
}// 26
26+
27+
private void test4(TestMethodReferenceJ21 ref) {
28+
this.consume(ref::accept2);// 29
29+
}// 30
30+
31+
private void test5(RefsExt ref) {
32+
this.consume(ref::accept2);// 33
33+
}// 34
34+
35+
private void test6() {
36+
this.consume(this.ref()::accept);// 37
37+
}// 38
38+
39+
private void test6_() {
40+
this.consume(s -> this.ref().accept(s));// 41
41+
}// 42
42+
43+
private void test7() {
44+
this.consume(this.ref()::accept2);// 45
45+
}// 46
46+
47+
public TestMethodReferenceJ21 ref() {
48+
return this;// 49
49+
}
50+
51+
protected void consume(Consumer<String> c) {
52+
}// 54
53+
}
54+
55+
class 'pkg/TestMethodReferenceJ21' {
56+
method 'test ()V' {
57+
0 7
58+
1 7
59+
7 7
60+
8 7
61+
9 7
62+
a 8
63+
}
64+
65+
method 'test_ ()V' {
66+
0 11
67+
7 11
68+
8 11
69+
9 11
70+
a 12
71+
}
72+
73+
method 'lambda$test_$1 (Ljava/lang/String;)V' {
74+
0 11
75+
1 11
76+
2 11
77+
3 11
78+
4 11
79+
5 11
80+
}
81+
82+
method 'test2 ()V' {
83+
0 15
84+
1 15
85+
7 15
86+
8 15
87+
9 15
88+
a 16
89+
}
90+
91+
method 'test3 (Lpkg/TestMethodReferenceJ21;)V' {
92+
0 19
93+
1 19
94+
c 19
95+
d 19
96+
e 19
97+
f 20
98+
}
99+
100+
method 'test3_ (Lpkg/TestMethodReferenceJ21;)V' {
101+
0 23
102+
1 23
103+
7 23
104+
8 23
105+
9 23
106+
a 24
107+
}
108+
109+
method 'test4 (Lpkg/TestMethodReferenceJ21;)V' {
110+
0 27
111+
1 27
112+
c 27
113+
d 27
114+
e 27
115+
f 28
116+
}
117+
118+
method 'test5 (Lext/RefsExt;)V' {
119+
0 31
120+
1 31
121+
c 31
122+
d 31
123+
e 31
124+
f 32
125+
}
126+
127+
method 'test6 ()V' {
128+
0 35
129+
1 35
130+
2 35
131+
3 35
132+
4 35
133+
f 35
134+
10 35
135+
11 35
136+
12 36
137+
}
138+
139+
method 'test6_ ()V' {
140+
0 39
141+
7 39
142+
8 39
143+
9 39
144+
a 40
145+
}
146+
147+
method 'lambda$test6_$5 (Ljava/lang/String;)V' {
148+
0 39
149+
1 39
150+
2 39
151+
3 39
152+
4 39
153+
5 39
154+
6 39
155+
7 39
156+
8 39
157+
}
158+
159+
method 'test7 ()V' {
160+
0 43
161+
1 43
162+
2 43
163+
3 43
164+
4 43
165+
f 43
166+
10 43
167+
11 43
168+
12 44
169+
}
170+
171+
method 'ref ()Lpkg/TestMethodReferenceJ21;' {
172+
0 47
173+
1 47
174+
}
175+
176+
method 'consume (Ljava/util/function/Consumer;)V' {
177+
0 51
178+
}
179+
}
180+
181+
Lines mapping:
182+
9 <-> 8
183+
10 <-> 9
184+
13 <-> 12
185+
14 <-> 13
186+
17 <-> 16
187+
18 <-> 17
188+
21 <-> 20
189+
22 <-> 21
190+
25 <-> 24
191+
26 <-> 25
192+
29 <-> 28
193+
30 <-> 29
194+
33 <-> 32
195+
34 <-> 33
196+
37 <-> 36
197+
38 <-> 37
198+
41 <-> 40
199+
42 <-> 41
200+
45 <-> 44
201+
46 <-> 45
202+
49 <-> 48
203+
54 <-> 52

0 commit comments

Comments
 (0)