Skip to content

Commit

Permalink
Move some calls to "is_astype"
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Jan 18, 2025
1 parent 9749420 commit 10254a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libponyc/codegen/gentrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static int trace_cap_nominal(pass_opt_t* opt, ast_t* type, ast_t* orig,
// val and tag in that order.
if(orig_cap == TK_ISO)
{
if(is_matchtype(orig, type, NULL, opt) == MATCHTYPE_ACCEPT)
if(is_astype(orig, type, NULL, opt) == MATCHTYPE_ACCEPT)
{
return PONY_TRACE_MUTABLE;
} else {
Expand All @@ -556,7 +556,7 @@ static int trace_cap_nominal(pass_opt_t* opt, ast_t* type, ast_t* orig,

if(ast_id(cap) == TK_VAL)
{
if(is_matchtype(orig, type, NULL, opt) == MATCHTYPE_ACCEPT)
if(is_astype(orig, type, NULL, opt) == MATCHTYPE_ACCEPT)
{
ast_setid(cap, orig_cap);
return PONY_TRACE_IMMUTABLE;
Expand All @@ -568,7 +568,7 @@ static int trace_cap_nominal(pass_opt_t* opt, ast_t* type, ast_t* orig,
pony_assert(ast_id(cap) == TK_TAG);

int ret = -1;
if(is_matchtype(orig, type, NULL, opt) == MATCHTYPE_ACCEPT)
if(is_astype(orig, type, NULL, opt) == MATCHTYPE_ACCEPT)
ret = PONY_TRACE_OPAQUE;

ast_setid(cap, orig_cap);
Expand Down
1 change: 1 addition & 0 deletions src/libponyc/type/matchtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ static matchtype_t is_nominal_match_entity(ast_t* operand, ast_t* pattern,
}
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");
}

Expand Down

0 comments on commit 10254a5

Please sign in to comment.