Skip to content

Commit

Permalink
More improvements for generic subtpying error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
jemc authored May 7, 2024
1 parent 52918cf commit 4d559f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libponyc/type/subtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ static bool is_eq_typeargs(ast_t* a, ast_t* b, errorframe_t* errorf,
ast_error_frame(errorf, a,
"%s has different type arguments than %s (the type arguments must be equivalent, not covariant nor contravariant)",
ast_print_type(a), ast_print_type(b));
ast_error_frame(errorf, a,
"this might be possible if either %s or %s were an interface rather than a concrete type",
ast_print_type(a), ast_print_type(b));
}

// Make sure we had the same number of typeargs.
Expand Down

0 comments on commit 4d559f3

Please sign in to comment.