Explorar o código

* do not allow implicit conversions from currency to orddef even if currency
is implemented via int64 (prevents e.g. calling abs(int64) for
abs(currency) on non-x86)

git-svn-id: trunk@21097 -

Jonas Maebe %!s(int64=13) %!d(string=hai) anos
pai
achega
99e70e7128
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      compiler/defcmp.pas

+ 4 - 1
compiler/defcmp.pas

@@ -290,7 +290,10 @@ implementation
                             internalerror(200210061);
                         end;
                       end
-                     else
+                     { currency cannot be implicitly converted to an ordinal
+                       type }
+                     else if not is_currency(def_from) or
+                             (cdo_explicit in cdoptions) then
                       begin
                         if cdo_explicit in cdoptions then
                           doconv:=basedefconvertsexplicit[basedeftbl[torddef(def_from).ordtype],basedeftbl[torddef(def_to).ordtype]]