Codetools have a problem with generics + method parameters
Original Reporter info from Mantis: sysrpl
-
Reporter name: Anthony Walter
Original Reporter info from Mantis: sysrpl
- Reporter name: Anthony Walter
Description:
This problem is related to the issue below with the exact same damages to the code navigation and exact same messages:
http://bugs.freepascal.org/view.php?id=20059
The difference is this issue is caused by parameters in a method as opposed to the return value of a method.
Steps to reproduce:
Example code that causes this error:
type
TComparer<T> = function(const Left, Right: T): Integer;
TTestClass<T> = class
public
function Find(Item: T; Comparer: TComparer<T>): T;
end;
Additional information:
The error comes into play because the Comparer parmeter of the Find method include a generic type. The pascal parser doesn't handle '<' between '(' and ')'.
Mantis conversion info:
- Mantis ID: 20073
- OS: unbuntu
- OS Build: 10.10
- Platform: linux
- Version: 0.9.30.1 (SVN)
- Fixed in revision: r32099 (#202608c3)