mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-04 22:29:23 +01:00
* don't allow overloading enum/int operations, because they should be
interpreted as internally define operations in case of enum type
definitions in {$mode delphi} (mantis #22860)
git-svn-id: trunk@22377 -
This commit is contained in:
parent
fd844d08e0
commit
3b968b4b35
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12824,6 +12824,7 @@ tests/webtbs/tw22741.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw22744.pp svneol=native#text/pascal
|
tests/webtbs/tw22744.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2277.pp svneol=native#text/plain
|
tests/webtbs/tw2277.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2280.pp svneol=native#text/plain
|
tests/webtbs/tw2280.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw22860.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2289.pp svneol=native#text/plain
|
tests/webtbs/tw2289.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2291.pp svneol=native#text/plain
|
tests/webtbs/tw2291.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2294.pp svneol=native#text/plain
|
tests/webtbs/tw2294.pp svneol=native#text/plain
|
||||||
|
|||||||
@ -255,6 +255,11 @@ implementation
|
|||||||
(
|
(
|
||||||
is_enum(rd) and
|
is_enum(rd) and
|
||||||
(treetyp in (order_theoretic_operators+[addn, subn]))
|
(treetyp in (order_theoretic_operators+[addn, subn]))
|
||||||
|
) or
|
||||||
|
(
|
||||||
|
{ for enum definitions, see webtbs/tw22860.pp }
|
||||||
|
is_integer(rd) and
|
||||||
|
(treetyp in (order_theoretic_operators+bit_manipulation_operators+arithmetic_operators))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|||||||
43
tests/webtbs/tw22860.pp
Normal file
43
tests/webtbs/tw22860.pp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{ %norun }
|
||||||
|
|
||||||
|
program tw22860;
|
||||||
|
|
||||||
|
{$ifdef fpc}
|
||||||
|
{$mode delphi}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
type
|
||||||
|
TZoneID=(
|
||||||
|
zNone=-1,
|
||||||
|
zSystem=zNone, // LC system parameters
|
||||||
|
zOven=0, // GC or LC column temperature
|
||||||
|
zInj=$10000,
|
||||||
|
zInjA=zInj,
|
||||||
|
zInjB=zInj + 1,
|
||||||
|
zInjC=zInj + 2,
|
||||||
|
zInjD=zInj + 3,
|
||||||
|
zDet=$20000, // GC and LC detectors
|
||||||
|
zDetA=zDet,
|
||||||
|
zDetB=zDet + 1,
|
||||||
|
zDetC=zDet + 2,
|
||||||
|
zDetD=zDet + 3,
|
||||||
|
zAux=$30000,
|
||||||
|
zAux1=zAux,
|
||||||
|
zAux2=zAux + 1,
|
||||||
|
zAux3=zAux + 2,
|
||||||
|
//LC
|
||||||
|
zPump=zInj,
|
||||||
|
zPumpA=zInjA,
|
||||||
|
zPumpB=zInjB,
|
||||||
|
zPumpC=zInjC,
|
||||||
|
zPumpD=zInjD,
|
||||||
|
|
||||||
|
zEvents = $00040000, //events manager zone
|
||||||
|
zSampler = $00050000, // autosampler
|
||||||
|
zDevice = $40000000, // the device itself
|
||||||
|
zBlock = $20000000 // the block of device
|
||||||
|
);
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user