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

pdecsub.pas, pd_static: * check whether the given pd is an operator or a class method not inside an Object and generate an error if either of these is true msg/errore.msg, msgidx.inc, msgtxt.inc: * add a message to inform that a certain procedure directive is not allowed + added tests git-svn-id: trunk@23944 -
21 lines
242 B
ObjectPascal
21 lines
242 B
ObjectPascal
{ %FAIL }
|
|
|
|
program tb0233;
|
|
|
|
{$mode objfpc}
|
|
{$modeswitch advancedrecords}
|
|
|
|
type
|
|
TTest = record
|
|
class operator + (aLeft, aRight: TTest): TTest; static;
|
|
end;
|
|
|
|
class operator TTest.+(aLeft, aRight: TTest): TTest;
|
|
begin
|
|
|
|
end;
|
|
|
|
begin
|
|
|
|
end.
|