casteng / i-pascal

A free Object Pascal language plugin for IntelliJ IDEA
111 stars 34 forks source link

undeclared identifiers inside with statement #28

Closed Sorien closed 5 years ago

Sorien commented 6 years ago
unit Unit1;

interface

type
  TFoo = class
  public
    constructor Create; overload;
    procedure Fa();
  end;

procedure Test();

implementation

procedure Test();
begin
  with TFoo.Create do
  try
    Fa; //undeclared identifier
  finally
    Free; //undeclared identifier
  end;
end;

{ TFoo }

constructor TFoo.Create;
begin

end;

procedure TFoo.Fa;
begin

end;

end.
casteng commented 6 years ago

There is a problem with type inference of a constructor call. Will be fixed in next release.

casteng commented 5 years ago

Fixed in 1.90