This morning, on compiling my Delphi source code, I received an hint:
Override method %s.%s should match case of ancestor %s.%s
The scenario that produces this hint, is the following:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
TClass1 = class | |
procedure VirtualMethod; virtual; abstract; | |
end; | |
TClass2 = class(TClass1) | |
procedure virtualmethod; override; | |
end; | |
procedure TClass2.virtualmethod; | |
begin | |
end; |
In this case, Class2 inherits from Class1; in Class1, the Virtual Method is declared using a Pascal Case form. In Class2 the inherited method is writed in plain form. The Hint, says that is a good practice to use the same form on declaring method.
For info about this kind of hints, look at Embarcadero Delphi DocWiki
#codinglikeacoder