Browse Source

* Using OleVariant type should trigger inclusion of Variants unit into uses clause the same way as using Variant type does. Mantis #22504.

git-svn-id: trunk@21970 -
sergei 13 years ago
parent
commit
3d19605fc2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/pexpr.pas

+ 1 - 1
compiler/pexpr.pas

@@ -2288,7 +2288,7 @@ implementation
                     else
                     else
                      begin
                      begin
                        { We need to know if this unit uses Variants }
                        { We need to know if this unit uses Variants }
-                       if (hdef=cvarianttype) and
+                       if ((hdef=cvarianttype) or (hdef=colevarianttype)) and
                           not(cs_compilesystem in current_settings.moduleswitches) then
                           not(cs_compilesystem in current_settings.moduleswitches) then
                          current_module.flags:=current_module.flags or uf_uses_variants;
                          current_module.flags:=current_module.flags or uf_uses_variants;
                        p1:=handle_factor_typenode(hdef,getaddr,again,srsym,typeonly);
                        p1:=handle_factor_typenode(hdef,getaddr,again,srsym,typeonly);