mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-24 19:31:35 +02:00
* 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:
parent
405a80066e
commit
c25d9d5e06
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user