aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-08-27 00:11:02 +0100
committergingerBill <bill@gingerbill.org>2020-08-27 00:11:02 +0100
commitd31c63c0ae76115d1b9aa8b5d1f8bf7130e74977 (patch)
tree2a151c7a2204acbe7a5ace6ae76d54a04ec0eb8f /src/types.cpp
parentc783840eab1a7b1d89467e631ff26391e1023e7e (diff)
Fix #714
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 4372bdd6a..453540252 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -877,6 +877,9 @@ Type *alloc_type_named(String name, Type *base, Entity *type_name) {
Type *t = alloc_type(Type_Named);
t->Named.name = name;
t->Named.base = base;
+ if (base != t) {
+ t->Named.base = base_type(base);
+ }
t->Named.type_name = type_name;
return t;
}