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

htypechk.pas, tcallcandidates: * collect_overloads_in_struct: we need to check the deftyp of the extended def for record- or objectdef, not the deftyp of the helper which will always be objectdef anyway. + added test git-svn-id: trunk@28572 -
30 lines
421 B
ObjectPascal
30 lines
421 B
ObjectPascal
{ %NORUN }
|
|
|
|
program tw26615;
|
|
|
|
{$MODE OBJFPC}{$H+}
|
|
{$MODESWITCH TYPEHELPERS}
|
|
|
|
uses
|
|
sysutils;
|
|
|
|
type
|
|
TStringHelper = type helper for UnicodeString
|
|
class function Cr(AStr: UnicodeString): UnicodeString; static; overload;
|
|
end;
|
|
|
|
class function TStringHelper.Cr(AStr: UnicodeString): UnicodeString;
|
|
begin
|
|
Result := '#'+AStr;
|
|
end;
|
|
|
|
var
|
|
us: UnicodeString;
|
|
|
|
begin
|
|
|
|
us := UnicodeString.Cr('a');
|
|
writeln(us);
|
|
|
|
end.
|