git-svn-id: trunk@14583 -
@@ -9081,6 +9081,7 @@ tests/test/tobjc30.pp svneol=native#text/plain
tests/test/tobjc30a.pp svneol=native#text/plain
tests/test/tobjc30b.pp svneol=native#text/plain
tests/test/tobjc30c.pp svneol=native#text/plain
+tests/test/tobjc31.pp svneol=native#text/plain
tests/test/tobjc4.pp svneol=native#text/plain
tests/test/tobjc4a.pp svneol=native#text/plain
tests/test/tobjc5.pp svneol=native#text/plain
@@ -166,7 +166,8 @@ implementation
sl : tpropaccesslist;
begin
if (pd.typ=procdef) and
- is_objc_class_or_protocol(tprocdef(pd)._class) then
+ is_objc_class_or_protocol(tprocdef(pd)._class) and
+ (pd.parast.symtablelevel=normal_function_level) then
{ insert Objective-C self and selector parameters }
vs:=tparavarsym.create('$_cmd',paranr_objc_cmd,vs_value,objc_seltype,[vo_is_msgsel,vo_is_hidden_para]);
@@ -0,0 +1,34 @@
+{ %target=darwin }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
+
+{$mode objfpc}
+{$modeswitch objectivec1}
+{ test program by saabino80 at alice in Italy for nested procedures in
+ Objective-C methods }
+Program Foo;
+uses
+ ctypes, MacOSAll, CocoaAll;
+Type MyObjc= objcclass(NSObject)
+Procedure nested; message 'nested';
+End;
+Procedure MyObjc.nested;
+Procedure one;
+Begin;
+ WriteLn('Ciao');
+Begin
+one;
+Var My:MyObjc;
+My := MyObjc.alloc;
+My.nested;
+My.release;
+End.