* do not search for overloaded operators while parsing constant declarations,

since they require function calls and it's not possible to call functions
    inside constant blocks (and because current_procinfo is not necessarily
    valid when a constant block is parsed, this moreover crashes the compiler)

git-svn-id: trunk@22018 -
This commit is contained in:
Jonas Maebe 2012-08-06 20:13:06 +00:00
parent 405a80066e
commit c25d9d5e06

View File

@ -2148,7 +2148,11 @@ implementation
if convtype=tc_none then
begin
cdoptions:=[cdo_check_operator,cdo_allow_variant,cdo_warn_incompatible_univ];
cdoptions:=[cdo_allow_variant,cdo_warn_incompatible_univ];
{ overloaded operators require calls, which is not possible inside
a constant declaration }
if block_type<>bt_const then
include(cdoptions,cdo_check_operator);
if nf_explicit in flags then
include(cdoptions,cdo_explicit);
if nf_internal in flags then