This commit is contained in:
Бондарев Иван 2019-01-31 21:27:18 +01:00
parent c42451dbb2
commit e6dcb22a7c
2 changed files with 26 additions and 0 deletions

View file

@ -829,6 +829,8 @@ namespace PascalABCCompiler.NETGenerator {
foreach (Type gt in t.GetGenericArguments()) foreach (Type gt in t.GetGenericArguments())
if (IsConstructedGenericType(gt)) if (IsConstructedGenericType(gt))
return true; return true;
if (t.IsArray)
return IsConstructedGenericType(t.GetElementType());
return false; return false;
} }

View file

@ -0,0 +1,24 @@
type
T = class
end;
var o: T;
procedure p(a: array of array of T);
begin
foreach var x in a do
foreach var y in x do
begin
o := y;
end;
end;
begin
var a: array of array of T;
SetLength(a, 2);
SetLength(a[0], 2);
SetLength(a[1], 2);
a[1][1] := new T;
p(a);
assert(a[1][1] = o);
end.