Commit 5fd6dc11 authored by Males, Sebastian's avatar Males, Sebastian
Browse files

Add lambda invalid tests

parent c869ab92
# Tries to call lambda with wrong arguments type.
# Output:
# #semantic_error#
# Exit:
# 200
# Program:
begin
int r = call (\(bool x) -> x)(2)
end
# Tries to use inexistent variable in lambda.
# Output:
# #semantic_error#
# Exit:
# 200
# Program:
begin
int r = call (\(bool x) -> y)(true)
end
# Tries to define lambda with an empty body
# Output:
# #syntax_error#
# Exit:
# 100
# Program:
begin
int y = call (\(x) -> )(2)
end
# Tries to define lambda a statement as body
# Output:
# #syntax_error#
# Exit:
# 100
# Program:
begin
int y = call (\(int x) -> return x)(2)
end
# Tries to define lambda with to parameter arguments
# Output:
# #syntax_error#
# Exit:
# 100
# Program:
begin
int y = call (\(x) -> x)(2)
end
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