mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
Actually maybe fix #5015
This commit is contained in:
@@ -3507,6 +3507,7 @@ gb_internal bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, T
|
|||||||
if (!ctx->in_polymorphic_specialization && ctx->disallow_polymorphic_return_types) {
|
if (!ctx->in_polymorphic_specialization && ctx->disallow_polymorphic_return_types) {
|
||||||
Type *t = base_type(elem);
|
Type *t = base_type(elem);
|
||||||
if (t != nullptr &&
|
if (t != nullptr &&
|
||||||
|
unparen_expr(pt->type)->kind == Ast_Ident &&
|
||||||
is_type_polymorphic_record_unspecialized(t)) {
|
is_type_polymorphic_record_unspecialized(t)) {
|
||||||
gbString err_str = expr_to_string(e);
|
gbString err_str = expr_to_string(e);
|
||||||
error(e, "Invalid use of a non-specialized polymorphic type '%s'", err_str);
|
error(e, "Invalid use of a non-specialized polymorphic type '%s'", err_str);
|
||||||
|
|||||||
Reference in New Issue
Block a user