Kryvich 165 Posted March 13, 2020 In Delphi 10.3.3 it's possible to write: TStaticCheck = class class procedure OverStatic; static; static; static; static; end; I don’t know, is it worth reporting to the issue tracker? The idea is taken from here: System.Generics.Collections.pas, TArray.BinarySearch<T> 1 Share this post Link to post
Stefan Glienke 2002 Posted March 13, 2020 https://quality.embarcadero.com/browse/RSP-20169 1 Share this post Link to post
Kryvich 165 Posted March 13, 2020 (edited) Overstatic methods cannot be moved to another class. Overstatic methods cannot be modified, only deleted completely. Add "static; static;" to a method to protect your class from coronavirus. P.S. In .NET it is considered an error. https://dotnetfiddle.net/dv8Rfh Edited March 13, 2020 by Kryvich Share this post Link to post
stijnsanders 35 Posted March 14, 2020 For what it's worth, going by the little I know about parsers, I guess the parser just takes any list of modifiers after the method signature, and sets the flags on the method. I guess "static" doesn't throw an error if the "static" internal flag was already set, so I agree it's quite harmless. Share this post Link to post