Skip to content

Commit 7d4441d

Browse files
author
svorenova
committed
Regression test for lambda in a package
1 parent 7366fda commit 7d4441d

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed
164 Bytes
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package LambdaTest;
2+
3+
interface Lamb1 {
4+
public Integer lambFunc1(Integer x);
5+
}
6+
7+
class Test {
8+
9+
public static Integer recvLambda(Integer y, Integer z) {
10+
Lamb1 lmb1 = (x) -> x = y + z; // Initializing in a lambda statement
11+
if (lmb1 != null && z != null) {
12+
return lmb1.lambFunc1(y);
13+
}
14+
return lmb1.lambFunc1(z);
15+
}
16+
}
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
LambdaTest/Test.class
3+
--show-symbol-table --function LambdaTest.Test.recvLambda
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
--
8+
This is to verify that parsing lambdas in a package does not crash.

0 commit comments

Comments
 (0)