pascalabcnet/TestSuite/af1_method_call_as_procedure.pas

21 lines
270 B
ObjectPascal
Raw Permalink Normal View History

2020-02-26 12:22:10 +03:00
type
TBase = class
function f1: real;
begin
Result := 3.5;
Assert(False);
end;
end;
TErr = class(TBase)
function f1: integer;
begin
Result := 2
end;
end;
begin
var a := new TErr;
Assert(a.f1=2);
a.f1;
end.