blob: 0fbc51cb94dea6ee7ddc8212bbcb14f80ccecd3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{$MODE DELPHI}
type
TA = class
const C = 1;
end;
TB<T> = object
procedure Foo;
end;
procedure TB<T>.Foo;
var
// X: array[0..T.C] of byte = (0); // Error: Expected another 1 array elements
X: array[0..T.C] of byte = (0, 2); // Fatal: Syntax error, ")" expected but "," found
begin
if high(x)<>1 then
halt(1);
writeln('ok');
end;
var
x: TB<TA>;
begin
x.Foo;
end.
|