Is there an equivalent to "is" for class references?

type    CNodeContent= class of TNodeContent;

  procedure walkContent(node: CNodeContent);

  begin
    Write(PadRight(OidToStr(node.GetOid), 32));
    if node is TScalar then
      Write('  s');

Compilation fails at that point:

test2.pas(46,13) Error: class type expected, but got "CNodeContent"
test2.pas(46,13) Error: Incompatible type for arg no. 2: Got "CNodeContent", expected "TObject"

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to