|
@@ -608,18 +608,23 @@ implementation
|
|
end;
|
|
end;
|
|
{In the procedure the array range is 0..(upper_bound-lower_bound).}
|
|
{In the procedure the array range is 0..(upper_bound-lower_bound).}
|
|
hightree:=caddnode.create(subn,r,l);
|
|
hightree:=caddnode.create(subn,r,l);
|
|
- typecheckpass(hightree);
|
|
|
|
|
|
|
|
{Replace the rangnode in the tree by its lower_bound, and
|
|
{Replace the rangnode in the tree by its lower_bound, and
|
|
dispose the rangenode.}
|
|
dispose the rangenode.}
|
|
temp:=Tvecnode(p).right;
|
|
temp:=Tvecnode(p).right;
|
|
Tvecnode(p).right:=l.getcopy;
|
|
Tvecnode(p).right:=l.getcopy;
|
|
|
|
+
|
|
|
|
+ {Typecheckpass can only be performed *after* the l.getcopy since it
|
|
|
|
+ can modify the tree, and l is in the hightree.}
|
|
|
|
+ typecheckpass(hightree);
|
|
|
|
+
|
|
with Trangenode(temp) do
|
|
with Trangenode(temp) do
|
|
begin
|
|
begin
|
|
left:=nil;
|
|
left:=nil;
|
|
right:=nil;
|
|
right:=nil;
|
|
end;
|
|
end;
|
|
temp.free;
|
|
temp.free;
|
|
|
|
+
|
|
{Tree changed from p[l..h] to p[l], recalculate resultdef.}
|
|
{Tree changed from p[l..h] to p[l], recalculate resultdef.}
|
|
p.resultdef:=nil;
|
|
p.resultdef:=nil;
|
|
typecheckpass(p);
|
|
typecheckpass(p);
|