Delphi – E2020 Object or class type required
When the syntax ‘Typename.Methodname’ is used, but the typename does not belong to an object or class type, this error message is displayed.
program Produce; type TInteger = class Value: Integer; end; var V: TInteger; begin V := Integer.Create; end.
TInteger has a Create method that Type Integer does not.
program Solve; type TInteger = class Value: Integer; end; var V: TInteger; begin V := TInteger.Create; end.
Make that the identification refers to an object or class type; it could be misspelt or obscured by another unit’s identity.
Leave Your Comment