Browse Source

* fixed tests/test/tmacprocvar.pp with nested procvar support (both @PROC
and PROC can apparently be used as procvars there)

git-svn-id: branches/nestedprocvars@15693 -

Jonas Maebe 15 years ago
parent
commit
be5a358894
2 changed files with 3 additions and 4 deletions
  1. 2 3
      compiler/ncal.pas
  2. 1 1
      compiler/ncnv.pas

+ 2 - 3
compiler/ncal.pas

@@ -679,9 +679,8 @@ implementation
                  left:=ttypeconvnode(left).left;
                  ttypeconvnode(hp).left:=nil;
                  hp.free;
-               end
-             else
-               maybe_global_proc_to_nested(left,parasym.vardef);
+               end;
+             maybe_global_proc_to_nested(left,parasym.vardef);
 
              { Handle varargs and hidden paras directly, no typeconvs or }
              { pass_typechecking needed                                       }

+ 1 - 1
compiler/ncnv.pas

@@ -686,7 +686,7 @@ implementation
       begin
         result:=false;
         if (m_nested_procvars in current_settings.modeswitches) and
-           ([m_tp_procvar,m_mac_procvar]*current_settings.modeswitches=[]) and
+           not(m_tp_procvar in current_settings.modeswitches) and
            (todef.typ=procvardef) and
            is_nested_pd(tprocvardef(todef)) and
            (fromnode.nodetype=typeconvn) and