summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2012-09-12 16:03:09 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2012-09-12 16:03:09 +0000
commitfc3a8045ccb80374bb8e2360432847c9c2fcb346 (patch)
tree11f59d78913a8ec144e0d3f33b0355140e29eed9 /compiler
parent0617aa0bb6aff452a092e63c68defb53125b25ce (diff)
downloadfpc-fc3a8045ccb80374bb8e2360432847c9c2fcb346.tar.gz
* 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: http://svn.freepascal.org/svn/fpc/trunk@22377 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler')
-rw-r--r--compiler/htypechk.pas5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/htypechk.pas b/compiler/htypechk.pas
index cf1a4d4c2c..f93bb2162a 100644
--- a/compiler/htypechk.pas
+++ b/compiler/htypechk.pas
@@ -255,6 +255,11 @@ implementation
(
is_enum(rd) and
(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;