pascalabcnet/TestSuite/classconst4.pas

14 lines
253 B
ObjectPascal
Raw Normal View History

2021-10-03 12:07:35 +03:00

type
TArrStr = array of string;
t1 = class
public const arr: array of string = ('abc', 'def');
end;
begin
var arr := TArrStr(typeof(t1).GetField('arr').GetValue(nil));
assert(arr[0] = 'abc');
assert(arr[1] = 'def');
end.