Pattern guards for functions and switch statements #830
@ -813,6 +813,9 @@ failing_contracts() ->
|
||||
[<<?Pos(8,12)
|
||||
"Cannot reference stateful function g (at line 8, column 12) in a pattern guard.">>
|
||||
])
|
||||
, ?TYPE_ERROR(non_boolean_pattern_guard,
|
||||
[<<?Pos(4,24)
|
||||
"Cannot unify string\n and bool\nwhen checking the type of the expression at line 4, column 24\n \"y\" : string\nagainst the expected type\n bool">>
|
||||
])
|
||||
].
|
||||
|
||||
|
4
test/contracts/non_boolean_pattern_guard.aes
Normal file
4
test/contracts/non_boolean_pattern_guard.aes
Normal file
@ -0,0 +1,4 @@
|
||||
contract C =
|
||||
type state = int
|
||||
|
||||
entrypoint init(x) | "y" = 1
|
Loading…
x
Reference in New Issue
Block a user