aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@axiomatics.org>2016-01-20 01:18:50 -0800
committerGabriel Dos Reis <gdr@axiomatics.org>2016-01-20 01:18:50 -0800
commit5fada1926a255e03c29687d81971f3cd95161997 (patch)
tree083f45022a6bff538234b56fb68411ab7ba56047 /src/interp
parent6c972c2a3ae6a6875417d7a8f9442c2abdc170ff (diff)
downloadopen-axiom-5fada1926a255e03c29687d81971f3cd95161997.tar.gz
testExtend: Handle case where first argument is presented as an attribute.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/cattable.boot6
-rw-r--r--src/interp/database.boot1
2 files changed, 5 insertions, 2 deletions
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