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
Showing only changes of commit 9174b90986 - Show all commits

View File

@ -3906,7 +3906,7 @@ mk_error({mutually_recursive_constants, Consts}) ->
[{letval, Ann, _, _} | _] = Consts,
mk_t_err(pos(Ann), Msg);
mk_error({invalid_const_id, Ann}) ->
Msg = "Pattern matching is not allowed when defining compile-time constants",
Msg = "The name of the compile-time constant cannot have pattern matching nor type",
mk_t_err(pos(Ann), Msg);
mk_error({invalid_const_expr, ConstId}) ->
Msg = io_lib:format("Invalid expression in the definition of the constant `~s`", [name(ConstId)]),