type mismatch in length of generic type
Original Reporter info from Mantis: kandu
-
Reporter name: ZAN DoYe
Original Reporter info from Mantis: kandu
- Reporter name: ZAN DoYe
Description:
can't pass a generic type to Length function, fpc compains: 'Type mismatch'.
I alsa noticed that the problem with SetLength generic type is solved, in bug_id=20557
Steps to reproduce:
program genericTest;
{$mode objfpc}
type
generic tg<T>= class
public
class function len(a: T): integer;
end;
class function tg.len(a: T): integer;
begin
result:= length(a);
end;
begin
end.
Mantis conversion info:
- Mantis ID: 23776
- OS: linux
- OS Build: Debian 3.2.35
- Platform: amd64
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 27533 (#256c8526)