fpc/tests/webtbs/tw8150a.pp
Jonas Maebe c6733ed9a5 * disallow placing fields after method/property definitions, because this
can create ambiguities for the parser in case the field names also exist
    as modifiers (TP- and Delphi-compatible, mantis #13971) + tests
  * fixed tests that broke because of this change

git-svn-id: trunk@13334 -
2009-06-27 12:59:46 +00:00

38 lines
400 B
ObjectPascal

{$ifdef fpc}
{$mode delphi}
{$endif}
type
tc = class
a : longint;
class procedure classmethod;
procedure method;
end;
ttc = class of tc;
var
l : longint;
class procedure tc.classmethod;
begin
if l <> 1 then
halt(1);
l := 2;
end;
procedure tc.method;
begin
end;
var
c: ttc;
begin
c := tc;
l := 1;
with c do
classmethod;
if l <> 2 then
halt(2);
end.