{$MODE DELPHI} type TA = class const C = 1; end; TB = class procedure Foo; end; procedure TB.Foo; var i: Integer = 0; begin // i := i + T.C; // <- is ok Inc(i, T.C); // Error: Incompatible types: got "untyped" expected "LongInt" if i<>1 then halt(1); end; var B : TB; begin B:=TB.Create; B.Foo; B.Free; writeln('ok'); end.