diff --git a/compiler/htypechk.pas b/compiler/htypechk.pas index 1e4c105add..d7ff9358ec 100644 --- a/compiler/htypechk.pas +++ b/compiler/htypechk.pas @@ -1033,7 +1033,8 @@ implementation { Temp strings are stored in memory, for compatibility with delphi only } if (m_delphi in aktmodeswitches) and - (valid_addr in opts) and + ((valid_addr in opts) or + (valid_const in opts)) and (hp.resulttype.def.deftype=stringdef) then result:=true else