harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 96e04656ccd9dd628191b31a3e9dfaa86d3bb1c0
parent 07196daba75a25dcde6f2f20dca666ad662467c7
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri, 22 Jan 2021 19:31:03 -0500

parse: use synassert for match (x) { foo::int =>

Diffstat:
Msrc/parse.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/parse.c b/src/parse.c @@ -1719,7 +1719,8 @@ parse_match_expression(struct lexer *lexer) break; case T_DOUBLE_COLON: _case->type = parse_type(lexer); - assert(_case->type->storage == TYPE_STORAGE_ALIAS); + synassert(_case->type->storage == TYPE_STORAGE_ALIAS, + &tok, T_NAME, T_EOF); struct identifier ident = { .name = tok.name, // Assumes ownership .ns = xcalloc(1, sizeof(struct identifier)),