Commit f76218fe authored by Males, Sebastian's avatar Males, Sebastian
Browse files

Fix compilation errors of lambda valid tests

parent cd08864c
# Call lambdas repetitively
#
# Output:
# 0
# 1
# 2
# 3
# 4
#
# Program:
begin
int n = 5
int n = 5 ;
int i = 0 ;
while i < n do
println call (\() -> i)() ;
i = i + 1;
done ;
int r = call (\(int i) -> i)(i) ;
println r ;
i = i + 1
done
end
......@@ -6,8 +6,9 @@
# Program:
begin
int f(int x, int y) is
return call (\(int x, int y) -> x * y)(x,y)
int r = call (\(int x, int y) -> x * y)(x,y);
return r
end
int y = f(2,3)
int y = call f(2,3);
print y
end
\ No newline at end of file
......@@ -6,5 +6,6 @@
# Program:
begin
print call (\(int x, int y, bool z, bool a, bool b, string c) -> x + y)(2, 3, false, false, true, "hello")
int r = call (\(int x, int y, bool z, bool a, bool b, string c) -> x + y)(2, 3, false, false, true, "hello");
print r
end
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment