summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-11-23 21:10:08 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-11-23 21:10:08 -0800
commite9ac435a6c1904ce8f000b13087ebc179f3e430e (patch)
tree43ba27384de28c53a62d2d27a82918ca93070b8a /struct.c
parent3343e230783eefbf3c479f00e46164a2407c2019 (diff)
downloadtxr-e9ac435a6c1904ce8f000b13087ebc179f3e430e.tar.gz
txr-e9ac435a6c1904ce8f000b13087ebc179f3e430e.tar.bz2
txr-e9ac435a6c1904ce8f000b13087ebc179f3e430e.zip
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.
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
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;