mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 08:48:08 +02:00

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 -
38 lines
400 B
ObjectPascal
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.
|