Introduce contract-level compile-time constants #923

Merged
ghallak merged 37 commits from ghallak/387 into master 2023-04-12 20:20:41 +09:00
2 changed files with 1 additions and 5 deletions
Showing only changes of commit 2bafa3771e - Show all commits

View File

@ -1264,10 +1264,7 @@ failing_contracts() ->
[<<?Pos(2,9)
"The name of the compile-time constant cannot have pattern matching">>,
<<?Pos(3,9)
"The name of the compile-time constant cannot have pattern matching">>,
<<?Pos(4,20)
"Cannot unify `string` and `bool`\n"
"when checking the type of the expression `\"str\" : string` against the expected type `bool`">>
"The name of the compile-time constant cannot have pattern matching">>
])
].

View File

@ -1,4 +1,3 @@
contract C =
let x::_ = [1,2,3,4]
let y::(p = z::_) = [1,2,3,4]
let q : bool = "str"