class function f : Boolean; static;
Static methods have not Self inside.
So, t.f should not have access to v and p.
v and p are class variables/properties, so they're essentially global variables/properties except that they're in the record's namespace (which is exactly what I want).
Right way:
class function t.f : Boolean;
begin
Result := t.v;
// or
Result := t.p;
end;
I'll probably use that, thanks. (It's just a bit silly having to write the record's name in its own method.)