summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/struct.c b/struct.c
index 9de7d0c5..054b5f09 100644
--- a/struct.c
+++ b/struct.c
@@ -263,8 +263,12 @@ val super(val type)
val stype = find_struct_type(type);
if (!stype)
no_such_struct(lit("super"), type);
- return super(stype);
- } else {
+ type = stype;
+ } else if (structp(type)) {
+ type = struct_type(type);
+ }
+
+ {
struct struct_type *st = coerce(struct struct_type *,
cobj_handle(type, struct_type_s));
return st->super;