mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 10:38:14 +02:00

in "array_dec" and "procvar_dec" "parse_generic" needs to be true if the currently parsed declaration (array or procvar) is declared inside a generic, because only then specializations of other types (it does not matter whether they are inline or in a type section of the current generic) are parsed correctly (this fixes Mantis #20577 and Mantis #20955 ) + add tests for the mentioned bug reports (testing only the array case) (tests\webtbs) and tests for the procvar case (tests\test) git-svn-id: trunk@19953 -
37 lines
513 B
ObjectPascal
37 lines
513 B
ObjectPascal
program tw20577b;
|
|
|
|
{$mode delphi}{$H+}
|
|
|
|
type
|
|
|
|
TSimpleHashBucket<T> = record
|
|
HashCode : Integer;
|
|
Value : T;
|
|
end;
|
|
|
|
TSimpleHashBucketArray<T> = array of TSimpleHashBucket<T>;
|
|
|
|
{ TSimpleHash }
|
|
|
|
TSimpleHash<T> = class
|
|
private
|
|
type
|
|
THashBucket = TSimpleHashBucket<T>;
|
|
var
|
|
FBuckets: array of THashBucket;
|
|
procedure test;
|
|
end;
|
|
|
|
{ TSimpleHash<T> }
|
|
|
|
procedure TSimpleHash<T>.test;
|
|
var
|
|
oldBuckets : TSimpleHashBucketArray<T>;
|
|
begin
|
|
oldBuckets := FBuckets;
|
|
|
|
end;
|
|
|
|
begin
|
|
end.
|