codetool stops working if 'specialize' keyword is used in function/procedure definition
Original Reporter info from Mantis: petkos
-
Reporter name:
Original Reporter info from Mantis: petkos
- Reporter name:
Description:
codetools always reports a syntax error if 'specialize' keyword is used in function/procedure definition for generic maethods. However the program compiles fine.
Steps to reproduce:
- copy attached example to your Project
- mark "DoIt;" in the main program
- form context menu select "find declaration of DoIt"
result:
project1.lpr(11,43) Error: expected ;, but TDynArray found
Additional information:
program project1;
type
generic TDynArray<T> = array of T;
type
generic TObjectSet<T> = class
private
_values: specialize TDynArray<T>;
public
constructor Create(Values: specialize TDynArray<T>);
end;
constructor TObjectSet.Create(Values: specialize TDynArray<T>);
begin
_values:= Values;
end;
procedure DoIt;
var tmp: specialize TObjectSet<Integer>;
begin
tmp:= specialize TObjectSet<Integer>.Create([1,2]);
end;
begin
DoIt;
end.
Mantis conversion info:
- Mantis ID: 32018
- OS: Windows
- OS Build: any
- Build: 55348
- Platform: x86, x64
- Version: 1.9 (SVN)
- Monitored by: » petkos (petkos)