From 466de9f18fe8b763a5714ad75ec2c4e76032f978 Mon Sep 17 00:00:00 2001 From: "Sean T. Allen" Date: Sat, 18 Jan 2025 18:42:58 +0000 Subject: [PATCH] Fix up --- src/libponyc/expr/match.c | 3 +-- src/libponyc/type/matchtype.c | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/libponyc/expr/match.c b/src/libponyc/expr/match.c index fca3472519..c2b5b1078c 100644 --- a/src/libponyc/expr/match.c +++ b/src/libponyc/expr/match.c @@ -498,6 +498,7 @@ bool expr_case(pass_opt_t* opt, ast_t* ast) return false; ast_t* pattern_type = make_pattern_type(opt, pattern); + if(pattern_type == NULL) return false; @@ -581,8 +582,6 @@ bool expr_case(pass_opt_t* opt, ast_t* ast) } } - ast_free_unattached(pattern_type); - return ok; } diff --git a/src/libponyc/type/matchtype.c b/src/libponyc/type/matchtype.c index 0f09b66c2c..4f7829fdf3 100644 --- a/src/libponyc/type/matchtype.c +++ b/src/libponyc/type/matchtype.c @@ -579,7 +579,6 @@ static matchtype_t is_nominal_match_entity(ast_t* operand, ast_t* pattern, // If the operand does provide the pattern, but the operand refcap can't // match the pattern refcap, deny the match. - //printf("----> o_cap: %d, o_eph: %d, p_cap: %d, p_eph: %d\n", ast_id(o_cap), ast_id(o_eph), ast_id(p_cap), ast_id(p_eph)); if(!is_cap_sub_cap(ast_id(o_cap), ast_id(o_eph), ast_id(p_cap), ast_id(p_eph))) { @@ -598,11 +597,6 @@ static matchtype_t is_nominal_match_entity(ast_t* operand, ast_t* pattern, "this would be possible if the subcap were more ephemeral. " "Perhaps you meant to consume this variable"); } - else - { - printf("----> o_cap: %d, o_eph: %d, p_cap: %d, p_eph: %d\n", ast_id(o_cap), ast_id(o_eph), ast_id(p_cap), ast_id(p_eph)); - printf("----> errorf is NULL\n"); - } return MATCHTYPE_DENY_CAP; }