mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 08:18:12 +02:00

* don't run pass_1 on str or val calls in generic method/procedure definitions, resolves #18420 git-svn-id: trunk@16849 -
26 lines
249 B
ObjectPascal
26 lines
249 B
ObjectPascal
unit tw18420;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
interface
|
|
|
|
type
|
|
generic TGC<T> = class
|
|
Value: T;
|
|
procedure M;
|
|
end;
|
|
|
|
TGI = specialize TGC<Integer>;
|
|
|
|
implementation
|
|
|
|
procedure TGC.M;
|
|
var
|
|
s: String;
|
|
begin
|
|
Str(Value,s);
|
|
Val(s,Value);
|
|
end;
|
|
|
|
end.
|