Change tests to include multiple guards
This commit is contained in:
parent
06118542f2
commit
2a15626c3c
@ -810,8 +810,9 @@ failing_contracts() ->
|
||||
"Unbound variable g at line 8, column 23">>
|
||||
])
|
||||
, ?TYPE_ERROR(stateful_pattern_guard,
|
||||
[<<?Pos(10,12)
|
||||
"Cannot reference stateful function g (at line 10, column 12) in a pattern guard.">>
|
||||
[<<?Pos(8,12)
|
||||
"Cannot reference stateful function g (at line 8, column 12) in a pattern guard.">>
|
||||
])
|
||||
])
|
||||
].
|
||||
|
||||
|
@ -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
|
||||
c => 7
|
||||
|
@ -1,5 +1,3 @@
|
||||
include "List.aes"
|
||||
|
||||
contract C =
|
||||
type state = int
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user