diff --git a/releasenotes.md b/releasenotes.md index 88eed439e..604e4b0e9 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -36,6 +36,7 @@ - The `%s` would not properly print function pointers. - Compiler crash when passing an untyped list as an argument to `assert` #2108. - `@ensure` should be allowed to read "out" variables. #2107 +- Error message for casting generic to incompatible type does not work properly with nested generics #1953 ### Stdlib changes - Hash functions for integer vectors and arrays. diff --git a/src/compiler/sema_decls.c b/src/compiler/sema_decls.c index 24f7582a8..40a60ff33 100755 --- a/src/compiler/sema_decls.c +++ b/src/compiler/sema_decls.c @@ -4757,6 +4757,10 @@ static bool sema_generate_parameterized_name_to_scratch(SemaContext *context, Mo else { scratch_buffer_append(type->name); + if (type_is_user_defined(type) && type->decl->unit->module->generic_suffix) + { + scratch_buffer_append(type->decl->unit->module->generic_suffix); + } } } else