1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
{ %opt=-gt } program test; {$MODE OBJFPC} type xstr = interface(iunknown) end; operator := (a: integer): xstr; begin if ptruint(result) <> ptruint(nil) then halt(1); pointer(result) := nil; end; var x: xstr; begin x := 42; end.