aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-05-09 08:35:16 +0100
committerGitHub <noreply@github.com>2025-05-09 08:35:16 +0100
commit23aff08556589a80d886cceb3482428507e7c46f (patch)
tree9ee38691a31346fdc534976cca8cbfea259a5045 /src/types.cpp
parent10d83323949a11364c77c6a6c32196990509870b (diff)
parent3c0ba5bb55fe59ed1644c3e61fd2a81fb856624e (diff)
Merge pull request #5117 from bogwi/bug/5024
Bug/5024
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 32becc446..ce921796d 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -2957,6 +2957,10 @@ gb_internal Type *default_type(Type *type) {
case Basic_UntypedString: return t_string;
case Basic_UntypedRune: return t_rune;
}
+ } else if (type->kind == Type_Generic) {
+ if (type->Generic.specialized) {
+ return default_type(type->Generic.specialized);
+ }
}
return type;
}