Skip to content

Commit a7f47f2

Browse files
committed
modules: Fix the lambda call in the proc module
1 parent 4a36b43 commit a7f47f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/piccode/rt/modules/PiccodeProcModule.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public static void addFunctions() {
3232
PiccodeValue.verifyType(caller, func, Type.CLOSURE);
3333
var closure = (PiccodeClosure) func;
3434
((PiccodeArray)array).nodes.forEach(value -> {
35-
closure.call(value);
36-
closure.evaluateIfReady();
35+
var cl = (PiccodeClosure) closure.call(value);
36+
cl.evaluateIfReady();
3737
});
3838
return new PiccodeUnit();
3939
}, null);
@@ -48,8 +48,8 @@ public static void addFunctions() {
4848
PiccodeValue.verifyType(caller, func, Type.CLOSURE);
4949
var closure = (PiccodeClosure) func;
5050
while (true) {
51-
closure.call(new PiccodeUnit());
52-
closure.evaluateIfReady();
51+
var cl = (PiccodeClosure) closure.call(new PiccodeUnit());
52+
cl.evaluateIfReady();
5353
}
5454
}, null);
5555
}

0 commit comments

Comments
 (0)