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

Fix compilation errors of lambda valid tests

parent cd08864c
# Call lambdas repetitively # Call lambdas repetitively
#
# Output: # Output:
# 0 # 0
# 1 # 1
# 2 # 2
# 3 # 3
# 4 # 4
#
# Program: # Program:
begin begin
int n = 5 int n = 5 ;
int i = 0 ; int i = 0 ;
while i < n do while i < n do
println call (\() -> i)() ; int r = call (\(int i) -> i)(i) ;
i = i + 1; println r ;
done ; i = i + 1
done
end end
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
# Program: # Program:
begin begin
int f(int x, int y) is 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 end
int y = f(2,3) int y = call f(2,3);
print y print y
end end
\ No newline at end of file
...@@ -6,5 +6,6 @@ ...@@ -6,5 +6,6 @@
# Program: # Program:
begin 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 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