Case Fix methods interface implementation

Wish:
Can we have also a fix for case mismatches between interface and implementation for methods?

interface part as master ? Like W0 ?

or a Shortcut to synchronize Interface declaration and Implementation?

Thanks, logged as bugs://82897

bugs://82897 got closed with status fixed.

Sorry to tell, the fix will not work:
Test:

namespace ConsoleApplication5;
interface
type
  testClass = public class
  private
  protected
  public
    method Test;
    method Test(const Helper : Integer);
  end;
  
implementation

method testClass.test;
begin
end;

method testClass.test(const helper: Integer);
begin
 var temp := helper * 2;
end;
end.



W: Case for identifier "Test" does not match original case "test" [X:\Elements\ConsoleApplication5\Class.pas (14)]
W: Case for identifier "Test" does not match original case "test" [X:\Elements\ConsoleApplication5\Class.pas (19)]
W: Case for identifier "helper" does not match original case "Helper" [X:\Elements\ConsoleApplication5\Class.pas (21)]

bugs://82897 got reopened.

Just to be clear I see you get the case mismatch warnings but no fixits?

Yes I would expect the same signature in implementation as in interface
for the method name an method params.
but now I got only the Warning and the name did not change.
Also I would expect the name case for the param “Helper” in the Method signature to change

Auto fix of case is an option. There’s is also a fixit on it though

Note the fix it.
and if you select:

the last two, it automatically fixes them.

Hello Carlo,
I think we don’t speak about the same. Here some pictures:
Settings:

Before compile:

After Compile:

I would expect:

ah! it fixes the “Helper” to “Helper” instead of helper ? (note that it should work the next time around)

And the 2 “test” methods should be “Test”
at moment they stay the same as “test” and in every compile of the file they tread a warning…

Now I get it. Sorry I completely overlooked this, the warning is the wrong way around.

1 Like

fixed for fridays build. thanks!

1 Like