fpc/tests/webtbs/tw20577b.pp
svenbarth 17a276aabc * compiler\pdecl.pas:
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 -
2012-01-02 16:02:51 +00:00

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.