2
0
Эх сурвалжийг харах

* fixed the type of self in Objective-C category methods

git-svn-id: trunk@30948 -
Jonas Maebe 10 жил өмнө
parent
commit
fa9ba26cb4

+ 2 - 0
compiler/pparautl.pas

@@ -235,6 +235,8 @@ implementation
                   type or equal to an instance of it }
                   type or equal to an instance of it }
                 if is_objectpascal_helper(tprocdef(pd).struct) then
                 if is_objectpascal_helper(tprocdef(pd).struct) then
                   selfdef:=tobjectdef(tprocdef(pd).struct).extendeddef
                   selfdef:=tobjectdef(tprocdef(pd).struct).extendeddef
+                else if is_objccategory(tprocdef(pd).struct) then
+                  selfdef:=tobjectdef(tprocdef(pd).struct).childof
                 else
                 else
                   selfdef:=tprocdef(pd).struct;
                   selfdef:=tprocdef(pd).struct;
                 { Generate self variable, for classes we need
                 { Generate self variable, for classes we need