mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 17:39:20 +02:00
git-svn-id: trunk@35495 -
This commit is contained in:
parent
07cfb2f43a
commit
16a11c8b7a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -14156,6 +14156,7 @@ tests/webtbs/tw1092.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw10920.pp svneol=native#text/plain
|
tests/webtbs/tw10920.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw10927.pp svneol=native#text/plain
|
tests/webtbs/tw10927.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw10931.pp svneol=native#text/plain
|
tests/webtbs/tw10931.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw10933.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw1096.pp svneol=native#text/plain
|
tests/webtbs/tw1096.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw10966.pp svneol=native#text/plain
|
tests/webtbs/tw10966.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1097.pp svneol=native#text/plain
|
tests/webtbs/tw1097.pp svneol=native#text/plain
|
||||||
|
@ -1012,8 +1012,11 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ only need to get the address of the procedure? }
|
{ only need to get the address of the procedure? Check token because
|
||||||
if getaddr then
|
in the case of opening parenthesis is possible to get pointer to
|
||||||
|
function result (lack of checking for token was the reason of
|
||||||
|
tw10933.pp test failure) }
|
||||||
|
if getaddr and (token<>_LKLAMMER) then
|
||||||
begin
|
begin
|
||||||
{ for now we don't support pointers to generic functions, but since
|
{ for now we don't support pointers to generic functions, but since
|
||||||
this is only temporary we use a non translated message }
|
this is only temporary we use a non translated message }
|
||||||
|
24
tests/webtbs/tw10933.pp
Normal file
24
tests/webtbs/tw10933.pp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
program tw10933;
|
||||||
|
|
||||||
|
{$MODE DELPHI}
|
||||||
|
|
||||||
|
var
|
||||||
|
s: string[3] = 'ABC';
|
||||||
|
|
||||||
|
procedure Foo(buf: PAnsiChar; expected: AnsiChar);
|
||||||
|
begin
|
||||||
|
WriteLn(buf^);
|
||||||
|
if buf^ <> expected then
|
||||||
|
Halt(1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function ClassNameShort(): PShortString;
|
||||||
|
begin
|
||||||
|
Result := @s;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Foo(@ClassNameShort()^[1], 'A');
|
||||||
|
Foo(@ClassNameShort()^[2], 'B');
|
||||||
|
Foo(@ClassNameShort()^[3], 'C');
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user