Talk:X1020 Constructing instance of '%s' containing abstract method '%s.%s' (Delphi)

From RAD Studio
Jump to: navigation, search

I have removed

 Another method of approaching the problem would be to derive a class from Base and then provide a concrete version of Abstraction.

because that is not a solution as long as we are still instantiating Base.

Frankly, I would have completely replaced the "solution" with something like

As a general design principle, you should never instantiate classes that contain abstract methods, such classes are only intended to serve as ancestors for other classes that do provide implementations for those abstract methods.
If you do create instances of abstract classes, it is your responsibility to make sure that their abstract methods never get called.

-- Blaise