Codetools can't create local variable for specialized list
Original Reporter info from Mantis: Michl @michl1
-
Reporter name: Michl
Original Reporter info from Mantis: Michl @michl1
- Reporter name: Michl
Description:
Codetools can't create local variable for specialized list:
procedure TFooList.DoBar;
begin
for LFoo in Self do;
end;
In that code place cursor in front of LFoo and press Ctrl + Shift + C. I get the message "project1.lpr(23,15) Error: Term has no simple type"
I would expect autocompletion to:
procedure TFooList.DoBar;
var
LFoo: Integer;
begin
for LFoo in Self do;
end;
Steps to reproduce:
Copy&Paste following code into a simple program and try:
program Project1;
{$mode objfpc}{$H+}
uses
fgl;
type
TFoo = Integer;
{ TFooList }
TFooList = class(specialize TFPGList<TFoo>)
public
procedure DoBar;
end;
{ TFooList }
procedure TFooList.DoBar;
begin
for LFoo in Self do; // place cursor here in front of LFoo and press Ctrl + Shift + C
end;
begin
end.
Mantis conversion info:
- Mantis ID: 38367
- Assignee Gitlab user: @PascalRiekenberg
- Assignee Mantis username: PascalR
- Assignee name: Pascal Riekenberg
- Build: r64395
- Version: 2.1 (SVN)