mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 10:59:18 +02:00
* allow pred/succ on non continous enumerations in delphi mode
git-svn-id: trunk@1878 -
This commit is contained in:
parent
3a81473a05
commit
46ecdc8f94
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6389,6 +6389,7 @@ tests/webtbs/tw4520.pp -text svneol=unset#text/plain
|
|||||||
tests/webtbs/tw4529.pp -text svneol=unset#text/plain
|
tests/webtbs/tw4529.pp -text svneol=unset#text/plain
|
||||||
tests/webtbs/tw4537.pp svneol=native#text/plain
|
tests/webtbs/tw4537.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4540.pp -text svneol=unset#text/plain
|
tests/webtbs/tw4540.pp -text svneol=unset#text/plain
|
||||||
|
tests/webtbs/tw4557.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4566.pp -text svneol=unset#text/plain
|
tests/webtbs/tw4566.pp -text svneol=unset#text/plain
|
||||||
tests/webtbs/ub1873.pp svneol=native#text/plain
|
tests/webtbs/ub1873.pp svneol=native#text/plain
|
||||||
tests/webtbs/ub1883.pp svneol=native#text/plain
|
tests/webtbs/ub1883.pp svneol=native#text/plain
|
||||||
|
@ -1613,7 +1613,8 @@ implementation
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if (resulttype.def.deftype=enumdef) and
|
if (resulttype.def.deftype=enumdef) and
|
||||||
(tenumdef(resulttype.def).has_jumps) then
|
(tenumdef(resulttype.def).has_jumps) and
|
||||||
|
not(m_delphi in aktmodeswitches) then
|
||||||
CGMessage(type_e_succ_and_pred_enums_with_assign_not_possible);
|
CGMessage(type_e_succ_and_pred_enums_with_assign_not_possible);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
12
tests/webtbs/tw4557.pp
Normal file
12
tests/webtbs/tw4557.pp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 4557 }
|
||||||
|
{ Submitted by "Marek Mauder" on 2005-11-29 }
|
||||||
|
{ e-mail: pentar@seznam.cz }
|
||||||
|
program FPCBugs;
|
||||||
|
{$IFDEF FPC}{$MODE DELPHI}{$ENDIF}
|
||||||
|
type
|
||||||
|
TEnum = (Item1 = 5, Item2 = 10, Item3 = 20);
|
||||||
|
var
|
||||||
|
Enum: TEnum = Item1;
|
||||||
|
begin
|
||||||
|
Enum := Succ(Enum);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user