mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 00:19:19 +02:00
* operator overload not allowed
This commit is contained in:
parent
6b96b70118
commit
6ced282cbc
20
tests/tbf/tb0161.pp
Normal file
20
tests/tbf/tb0161.pp
Normal file
@ -0,0 +1,20 @@
|
||||
{ %fail }
|
||||
|
||||
uses Strings;
|
||||
|
||||
Function PosEx(const SubStr, S: string; Offset: Cardinal): Integer;
|
||||
|
||||
var i : pchar;
|
||||
begin
|
||||
if (offset<1) or (offset>length(s)) then exit(0);
|
||||
i:=strpos(@s[1],@substr[offset]);
|
||||
if i=nil then
|
||||
PosEx:=0
|
||||
else
|
||||
// This should be forbidden
|
||||
PosEx:=(i-s)+offset;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user