From 4d559f341397a28d611abb24dfcd9bbac51f6d82 Mon Sep 17 00:00:00 2001 From: Joe Eli McIlvain Date: Tue, 7 May 2024 11:20:53 -0700 Subject: [PATCH] More improvements for generic subtpying error message. --- src/libponyc/type/subtype.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libponyc/type/subtype.c b/src/libponyc/type/subtype.c index 1c4f5fd648..14136a51f7 100644 --- a/src/libponyc/type/subtype.c +++ b/src/libponyc/type/subtype.c @@ -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.