mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 07:28:26 +02:00
* patch by Bart Broersma to allow to declare "LongInt = AnsiString" comparison
operator in non-macpas modes, resolves #29460 git-svn-id: trunk@43709 -
This commit is contained in:
parent
b8b5d84108
commit
2f374a37b7
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -17515,6 +17515,7 @@ tests/webtbs/tw2943.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2944.pp svneol=native#text/plain
|
||||
tests/webtbs/tw29444.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw2946.pp svneol=native#text/plain
|
||||
tests/webtbs/tw29460.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw29471.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2949.pp svneol=native#text/plain
|
||||
tests/webtbs/tw29491.pp svneol=native#text/plain
|
||||
|
@ -333,6 +333,7 @@ implementation
|
||||
(treetyp in order_theoretic_operators)
|
||||
) or
|
||||
(
|
||||
(m_mac in current_settings.modeswitches) and
|
||||
is_stringlike(rd) and
|
||||
(ld.typ=orddef) and
|
||||
(treetyp in string_comparison_operators)) or
|
||||
|
18
tests/webtbs/tw29460.pp
Normal file
18
tests/webtbs/tw29460.pp
Normal file
@ -0,0 +1,18 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
{$modeswitch advancedrecords}
|
||||
|
||||
operator = (z1: LongInt; z2 : ansistring) b : boolean;
|
||||
begin
|
||||
b := false;
|
||||
end;
|
||||
|
||||
var
|
||||
i: longint;
|
||||
s: string;
|
||||
begin
|
||||
if i = s then
|
||||
halt(1);
|
||||
writeln('ok');
|
||||
end.
|
Loading…
Reference in New Issue
Block a user