Skip to content

Commit

Permalink
Fix up
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Jan 18, 2025
1 parent b0b724d commit 466de9f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
3 changes: 1 addition & 2 deletions src/libponyc/expr/match.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -581,8 +582,6 @@ bool expr_case(pass_opt_t* opt, ast_t* ast)
}
}

ast_free_unattached(pattern_type);

return ok;
}

Expand Down
6 changes: 0 additions & 6 deletions src/libponyc/type/matchtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
{
Expand All @@ -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;
}
Expand Down

0 comments on commit 466de9f

Please sign in to comment.