pascalabcnet/TestSuite/question_point_Nullable_2.pas

14 lines
196 B
ObjectPascal
Raw Normal View History

2019-04-23 14:51:25 +03:00
type
T = record
y := 1;
function ToString: string; override := y.ToString;
end;
function F(x: T?): string;
begin
Result := x?.ToString();
end;
begin
assert(f(new T)='1');
end.