From 5fada1926a255e03c29687d81971f3cd95161997 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Wed, 20 Jan 2016 01:18:50 -0800 Subject: testExtend: Handle case where first argument is presented as an attribute. --- src/interp/cattable.boot | 6 ++++-- src/interp/database.boot | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/interp') diff --git a/src/interp/cattable.boot b/src/interp/cattable.boot index b45b0dd1..56b00384 100644 --- a/src/interp/cattable.boot +++ b/src/interp/cattable.boot @@ -328,8 +328,10 @@ mergeOr(x,y) == nil nil -testExtend(a:=[op,:argl],b) == - (u:= getConstructorAncestorsFromDB op) and (val:= LASSOC(b,u)) => +testExtend(a,b) == + a is ['ATTRIBUTE,a'] => + a' is [.,:.] and constructor? a'.op and testExtend(a',b) + (u:= getConstructorAncestorsFromDB a.op) and (val:= LASSOC(b,u)) => formalSubstitute(a,val) nil diff --git a/src/interp/database.boot b/src/interp/database.boot index 1eb2caaf..79d49785 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -103,6 +103,7 @@ getConstructorKindFromDB ctor == getConstructorAncestorsFromDB: %Symbol -> %List %Constructor getConstructorAncestorsFromDB ctor == + builtinConstructor? ctor => nil -- FIXME: catch at cal sites. GETDATABASE(ctor,"ANCESTORS") ++ return the modemap of the constructor or the instantiation -- cgit v1.2.3