This commit is contained in:
parent
c1c4e4499a
commit
15cd6f0bd0
|
|
@ -8170,7 +8170,7 @@ namespace PascalABCCompiler.NETGenerator
|
|||
//Массив присваиваем массиву=>надо вызвать копирование
|
||||
TypeInfo ti_l = helper.GetTypeReference(to.type);
|
||||
TypeInfo ti_r = helper.GetTypeReference(from.type);
|
||||
if (ti_l.is_arr && ti_r.is_arr)
|
||||
if (ti_l.is_arr && ti_r.is_arr && !(to is ILocalBlockVariableReferenceNode && (to as ILocalBlockVariableReferenceNode).Variable.name.StartsWith("$TV")))
|
||||
{
|
||||
il.Emit(OpCodes.Call, ti_r.clone_meth);
|
||||
}
|
||||
|
|
|
|||
14
TestSuite/with4.pas
Normal file
14
TestSuite/with4.pas
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
type
|
||||
TRec = record
|
||||
b: integer;
|
||||
end;
|
||||
|
||||
begin
|
||||
var a: array [0..1,0..1] of TRec;
|
||||
with a[0,0] do
|
||||
begin
|
||||
b := 2;
|
||||
end;
|
||||
|
||||
assert(a[0,0].b = 2);
|
||||
end.
|
||||
Loading…
Reference in a new issue