diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index 26804a1..934441d 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -810,8 +810,9 @@ failing_contracts() -> "Unbound variable g at line 8, column 23">> ]) , ?TYPE_ERROR(stateful_pattern_guard, - [<> + [<> + ]) ]) ]. diff --git a/test/contracts/patterns_guards.aes b/test/contracts/patterns_guards.aes index 6c6db60..081749b 100644 --- a/test/contracts/patterns_guards.aes +++ b/test/contracts/patterns_guards.aes @@ -6,10 +6,14 @@ contract C = entrypoint init() = f([1, 2, 3, 4]) function - f(x::[]) = 1 + f(x::[]) + | x > 1, x < 10 = 1 + | x < 1 = 9 f(x::y::[]) = 2 f(x::y::z) = switch(z) [] => 4 - a::[] | a > 10 => 5 + a::[] + | a > 10, a < 20 => 5 + | a > 5 => 8 b | List.length(b) > 5 => 6 - c => 7 \ No newline at end of file + c => 7 diff --git a/test/contracts/stateful_pattern_guard.aes b/test/contracts/stateful_pattern_guard.aes index e3706b4..a295ca1 100644 --- a/test/contracts/stateful_pattern_guard.aes +++ b/test/contracts/stateful_pattern_guard.aes @@ -1,5 +1,3 @@ -include "List.aes" - contract C = type state = int