diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-09-12 16:03:09 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-09-12 16:03:09 +0000 |
commit | fc3a8045ccb80374bb8e2360432847c9c2fcb346 (patch) | |
tree | 11f59d78913a8ec144e0d3f33b0355140e29eed9 /compiler | |
parent | 0617aa0bb6aff452a092e63c68defb53125b25ce (diff) | |
download | fpc-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.pas | 5 |
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; |