There are no complaints, because the assignement of the event is done in the form, not in code.
You can change the signature of the event (created by the IDE at design time) in the unit, and compilation will succeed.
Below I asked the IDE to create an OnKeyPress event for a TEdit, but then I went ahead and changed the code to:
procedure Edit1KeyPress(Sender: TObject; var Key: String);
This will compiles just fine, but obviously is dead wrong, and it will crash.
The compiler cannot know (AFAIK), the IDE can, and it should warn about this, like Delphi does.
So, this is a
known bug/limitation of the Lazarus IDE.
Bart