From e9ac435a6c1904ce8f000b13087ebc179f3e430e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 23 Nov 2015 21:10:08 -0800 Subject: Bugfix: super returning type rather than supertype. * struct.c (super): Fix regression from Oct 17. When the argument is a struct instance, we must return the supertype, not the type. --- struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/struct.c b/struct.c index 187c4618..f7768756 100644 --- a/struct.c +++ b/struct.c @@ -304,7 +304,7 @@ val super(val type) { if (structp(type)) { struct struct_inst *si = coerce(struct struct_inst *, type->co.handle); - return si->type->self; + return si->type->super; } else { struct struct_type *st = stype_handle(&type, lit("super")); return st->super; -- cgit v1.2.3