aboutsummaryrefslogtreecommitdiff
path: root/src/interp/i-map.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-08-10 16:45:54 +0000
committerdos-reis <gdr@axiomatics.org>2008-08-10 16:45:54 +0000
commit24a3196e17dc9792891c284c67d6dbe2171fd2d8 (patch)
tree440beab0062935656986736875ccd87fec529326 /src/interp/i-map.boot
parent784284687b04207c549d8ee6052c2d17f133d1b3 (diff)
downloadopen-axiom-24a3196e17dc9792891c284c67d6dbe2171fd2d8.tar.gz
Fix AW/422
* interp/i-spec1.boot (upDeclare): Fields are not declarations. * interp/i-map.boot (getUserIdentifiersIn): Ignore field names. * testsuite/interpreter/aw-422.input: New.
Diffstat (limited to 'src/interp/i-map.boot')
-rw-r--r--src/interp/i-map.boot11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot
index 6ec3c5c6..5fa7d4df 100644
--- a/src/interp/i-map.boot
+++ b/src/interp/i-map.boot
@@ -225,7 +225,11 @@ getUserIdentifiersIn body ==
S_+(getUserIdentifiersInIterators itl,getUserIdentifiersIn body1)
S_-(userIds,getIteratorIds itl)
body is [op,:l] =>
- argIdList:= "append"/[getUserIdentifiersIn y for y in l]
+ argIdList :=
+ -- field tags do not contribute to dependencies.
+ op = "Record" or (op = "Union" and l is [[":",.,.],:.]) =>
+ append/[getUserIdentifiersIn y for [.,.,y] in l]
+ "append"/[getUserIdentifiersIn y for y in l]
bodyIdList :=
CONSP op or not (GETL(op,'Nud) or GETL(op,'Led) or GETL(op,'up))=>
NCONC(getUserIdentifiersIn op, argIdList)
@@ -1019,7 +1023,10 @@ findLocalVars1(op,form) ==
form is [oper,:itrl,body] and MEMQ(oper,'(REPEAT COLLECT)) =>
findLocalsInLoop(op,itrl,body)
form is [y,:argl] =>
- y is 'Record => nil
+ y is "Record" or (y is "Union" and argl is [[":",.,.],:.]) =>
+ -- don't pick field tags, their are not variables.
+ for [tag,type] in argl repeat
+ findLocalsInLoop(op,type)
for x in argl repeat findLocalVars1(op,x)
keyedSystemError("S2IM0020",[op])