Duplicate identifier of property and method parameter of a class

Viewed 669

I transferred my project from Delphi to Lazarus. In a form I have a private method with parameter var Active: Boolean. In Delphi it was ok, but Lazarus give an error Error: Duplicate identifier "Active" and Hint: Identifier already defined in unit FORMS at line 641, on line 641 there is:

property Active: Boolean read FActive;

It is not difficult to change parameter name (with refactoring), but why can't I use the same name for property and parameter of method?
To make sure it is not an error of automatic conversion from Delphi, I created new project in Lazarus and added private method

procedure Test(var Active: Boolean);

The result was the same. Even if I use const or nothing instead of var. I've looked into FPC docs and didn't find any such limitations. I'm just curious.

1 Answers
Related