From 3a578b3f88a4695f3004bcc03ec8943497a026a5 Mon Sep 17 00:00:00 2001 From: jonas Date: Mon, 2 Aug 2010 21:55:27 +0000 Subject: * fixed tests/test/tmacprocvar.pp with nested procvar support (both @PROC and PROC can apparently be used as procvars there) git-svn-id: http://svn.freepascal.org/svn/fpc/branches/nestedprocvars@15693 3ad0048d-3df7-0310-abae-a5850022a9f2 --- compiler/ncal.pas | 5 ++--- compiler/ncnv.pas | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler') diff --git a/compiler/ncal.pas b/compiler/ncal.pas index f52baff477..7cc7fe74d2 100644 --- a/compiler/ncal.pas +++ b/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 } diff --git a/compiler/ncnv.pas b/compiler/ncnv.pas index a76cac6189..5c710c86cf 100644 --- a/compiler/ncnv.pas +++ b/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 -- cgit v1.2.1