mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 14:23:25 +02:00

nmat.pas: * correctly disable type checks if one of the arguments for MOD, DIV, SHR, SHL, NOT, -X and +X is a generic type parameter + added tests git-svn-id: trunk@27535 -
33 lines
338 B
ObjectPascal
33 lines
338 B
ObjectPascal
{ %NORUN }
|
|
|
|
program tb0606;
|
|
|
|
{$mode delphi}
|
|
|
|
type
|
|
TTest<T> = class
|
|
procedure Test;
|
|
end;
|
|
|
|
procedure TTest<T>.Test;
|
|
var
|
|
r: T;
|
|
i: LongInt;
|
|
begin
|
|
r := i div r;
|
|
r := r div i;
|
|
r := i mod r;
|
|
r := r mod i;
|
|
r := i shl r;
|
|
r := r shl i;
|
|
r := i shr r;
|
|
r := r shr i;
|
|
r := - r;
|
|
r := not r;
|
|
r := + r;
|
|
end;
|
|
|
|
begin
|
|
|
|
end.
|