diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/i-map.boot | 11 | ||||
-rw-r--r-- | src/interp/i-spec1.boot | 6 |
2 files changed, 15 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]) diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot index 9ad10e05..b8f6121d 100644 --- a/src/interp/i-spec1.boot +++ b/src/interp/i-spec1.boot @@ -1098,6 +1098,12 @@ upDeclare t == not isLegitimateMode(mode,nil,nil) => throwKeyedMsgSP("S2IE0004",[mode],op) categoryForm?(mode) => throwKeyedMsgSP("S2IE0011",[mode, 'category],op) packageForm?(mode) => throwKeyedMsgSP("S2IE0011",[mode, 'package],op) + getAtree(op,"callingFunction") => + -- This isn't a real declaration, rather a field specification. + not IDENTP lhs => throwKeyedMsg("S2IE0020",nil) + -- ??? When we come to support field spec as type, change this. + putValue(op,objNewWrap([":",lhs,mode],mode)) + putModeSet(op,[mode]) junk := lhs is ["free",["tuple",:vars]] or lhs is ['free,['LISTOF,:vars]] or lhs is ["free",:vars] => |