Is there any compiler options that let the compiler give me an error instead of a warning when i instantiate an abstract class?
Foo = class
procedure Bar; virtual; abstract;
end;
var
f : Foo;
begin
f := Foo.Create; // <-- should give me a compile time error
end;
In Delphi 2010 (at least, possibly earlier versions but cannot test/verify):
Project -> Options
+ Delphi Compiler
> Hints and Warnings
+ Output Warnings:
Constructing instance containing abstract method: ___________
Change this setting from "True" to "Error"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With