Why is this an issue?

Omitting the type for inline variable declarations has a few downsides, including:

How to fix it

Explicitly specify the variable's type:

procedure Example;
begin
  var Foo := 123;
end;
procedure Example;
begin
  var Foo: Integer := 123;
end;

Resources