Преглед на файлове

fcl-passrc: fixed prepending unitpath in error messages

git-svn-id: trunk@38971 -
Mattias Gaertner преди 7 години
родител
ревизия
b557bc5627

+ 45 - 24
packages/fcl-passrc/src/pasresolver.pp

@@ -1586,7 +1586,9 @@ type
     procedure LogMsg(const id: int64; MsgType: TMessageType; MsgNumber: integer;
       const Fmt: String; Args: Array of const; PosEl: TPasElement); overload;
     procedure GetIncompatibleTypeDesc(const GotType, ExpType: TPasResolverResult;
-      out GotDesc, ExpDesc: String);
+      out GotDesc, ExpDesc: String); overload;
+    procedure GetIncompatibleTypeDesc(const GotType, ExpType: TPasType;
+      out GotDesc, ExpDesc: String); overload;
     procedure RaiseMsg(const Id: int64; MsgNumber: integer; const Fmt: String;
       Args: Array of const; ErrorPosEl: TPasElement); virtual;
     procedure RaiseNotYetImplemented(id: int64; El: TPasElement; Msg: string = ''); virtual;
@@ -1793,7 +1795,7 @@ function GetClassAncestorsDbg(El: TPasClassType): string;
 function ResolverResultFlagsToStr(const Flags: TPasResolverResultFlags): string;
 function GetElementTypeName(El: TPasElement): string; overload;
 function GetElementTypeName(C: TPasElementBaseClass): string; overload;
-function GetElementFullPath(El: TPasElement): string; overload;
+function GetElementDbgPath(El: TPasElement): string; overload;
 function ResolveSimpleAliasType(aType: TPasType): TPasType;
 
 procedure SetResolverIdentifier(out ResolvedType: TPasResolverResult;
@@ -1998,7 +2000,7 @@ function GetClassAncestorsDbg(El: TPasClassType): string;
     Module:=C.GetModule;
     if Module<>nil then
       Result:=Result+Module.Name+'.';
-    Result:=Result+C.FullName;
+    Result:=Result+GetElementDbgPath(C);
   end;
 
 var
@@ -2153,7 +2155,7 @@ begin
     Result:=C.ClassName;
 end;
 
-function GetElementFullPath(El: TPasElement): string;
+function GetElementDbgPath(El: TPasElement): string;
 begin
   if El=nil then exit('nil');
   Result:='';
@@ -2828,7 +2830,7 @@ begin
       else if o is TPasClassIntfMap then
         o.Free
       else
-        raise Exception.Create('[20180322132757] '+Element.FullPath+' i='+IntToStr(i)+' '+GetObjName(o));
+        raise Exception.Create('[20180322132757] '+GetElementDbgPath(Element)+' i='+IntToStr(i)+' '+GetObjName(o));
       end;
     FreeAndNil(Interfaces);
     end;
@@ -3693,7 +3695,7 @@ var
   ok: Boolean;
 begin
   ok:=true;
-  //writeln('TPasResolver.OnFindFirstElement ',El.FullName);
+  //writeln('TPasResolver.OnFindFirstElement ',El.PathName);
   if (El is TPasProcedure)
       and ProcNeedsParams(TPasProcedure(El).ProcType) then
     // found a proc, but it needs parameters -> remember the first and continue
@@ -5648,7 +5650,7 @@ var
     o: TObject;
   begin
     if not (PropEl.Parent is TPasClassType) then
-      RaiseInternalError(20180323172125,PropEl.FullName);
+      RaiseInternalError(20180323172125,GetElementDbgPath(PropEl));
     aClass:=TPasClassType(PropEl.Parent);
     if PropEl.Args.Count>0 then
       RaiseMsg(20180323170952,nImplementsDoesNotSupportArrayProperty,
@@ -5715,7 +5717,7 @@ var
       else if o is TPasClassIntfMap then
         begin
         // properties are checked before method resolutions
-        RaiseInternalError(20180323175919,PropEl.FullName);
+        RaiseInternalError(20180323175919,GetElementDbgPath(PropEl));
         end
       else if o<>nil then
         RaiseInternalError(20180323174342,GetObjName(o))
@@ -6516,7 +6518,7 @@ var
 begin
   ClassScope:=El.CustomData as TPasClassScope;
   if ClassScope.Interfaces[Index]<>nil then
-    RaiseInternalError(20180322141916,El.FullName+' '+IntToStr(Index)+' '+GetObjName(TObject(ClassScope.Interfaces[Index])));
+    RaiseInternalError(20180322141916,GetElementDbgPath(El)+' '+IntToStr(Index)+' '+GetObjName(TObject(ClassScope.Interfaces[Index])));
   IntfType:=TPasClassType(ResolveAliasType(TPasType(El.Interfaces[Index])));
   Map:=nil;
   while IntfType<>nil do
@@ -14937,6 +14939,16 @@ begin
     end;
 end;
 
+procedure TPasResolver.GetIncompatibleTypeDesc(const GotType,
+  ExpType: TPasType; out GotDesc, ExpDesc: String);
+begin
+  GotDesc:=GetTypeDescription(GotType);
+  ExpDesc:=GetTypeDescription(ExpType);
+  if GotDesc<>ExpDesc then exit;
+  GotDesc:=GetTypeDescription(GotType,true);
+  ExpDesc:=GetTypeDescription(ExpType,true);
+end;
+
 function TPasResolver.CheckCallProcCompatibility(ProcType: TPasProcedureType;
   Params: TParamsExpr; RaiseOnError: boolean; SetReferenceFlags: boolean
   ): integer;
@@ -16753,9 +16765,9 @@ function TPasResolver.GetTypeDescription(aType: TPasType; AddPath: boolean): str
       Result:=aType.ElementTypeName;
     if AddPath then
       begin
-      s:=aType.FullPath;
+      s:=aType.ParentPath;
       if (s<>'') and (s<>'.') then
-        Result:=s+':'+Result;
+        Result:=s+'.'+Result;
       end;
   end;
 
@@ -17015,6 +17027,7 @@ var
   RTypeEl, LTypeEl: TPasType;
   SrcResolved, DstResolved: TPasResolverResult;
   LArray, RArray: TPasArrayType;
+  GotDesc, ExpDesc: String;
 
   function RaiseIncompatType: integer;
   begin
@@ -17072,22 +17085,27 @@ begin
       Result:=cExact
     else if (RTypeEl.ClassType=TPasClassOfType) then
       begin
-      if not ((RHS.IdentEl is TPasType)
-          and (ResolveAliasType(TPasType(RHS.IdentEl)).ClassType=TPasClassOfType)) then
+      if RHS.IdentEl is TPasType then
+        begin
+        Result:=cIncompatible;
+        if RaiseOnIncompatible then
+          begin
+          if ResolveAliasType(TPasType(RHS.IdentEl)) is TPasClassOfType then
+            RaiseMsg(20180317103206,nIncompatibleTypesGotExpected,sIncompatibleTypesGotExpected,
+              ['type class-of','class of '+TPasClassOfType(LTypeEl).DestType.Name],ErrorEl)
+          else
+            RaiseMsg(20180511123859,nIncompatibleTypesGotExpected,sIncompatibleTypesGotExpected,
+              [GetResolverResultDescription(RHS),'class of '+TPasClassOfType(LTypeEl).DestType.Name],ErrorEl)
+          end;
+        end
+      else
         begin
         // e.g. ImageClass:=AnotherImageClass;
         Result:=CheckClassIsClass(TPasClassOfType(RTypeEl).DestType,
           TPasClassOfType(LTypeEl).DestType,ErrorEl);
         if (Result=cIncompatible) and RaiseOnIncompatible then
           RaiseMsg(20170216152500,nIncompatibleTypesGotExpected,sIncompatibleTypesGotExpected,
-            ['class of '+TPasClassOfType(RTypeEl).DestType.FullName,'class of '+TPasClassOfType(LTypeEl).DestType.FullName],ErrorEl);
-        end
-      else
-        begin
-        Result:=cIncompatible;
-        if (Result=cIncompatible) and RaiseOnIncompatible then
-          RaiseMsg(20180317103206,nIncompatibleTypesGotExpected,sIncompatibleTypesGotExpected,
-            ['type class-of','class of '+TPasClassOfType(LTypeEl).DestType.FullName],ErrorEl);
+            ['class of '+TPasClassOfType(RTypeEl).DestType.PathName,'class of '+TPasClassOfType(LTypeEl).DestType.PathName],ErrorEl);
         end;
       end
     else if (RHS.IdentEl is TPasType)
@@ -17097,7 +17115,7 @@ begin
       Result:=CheckClassIsClass(RTypeEl,TPasClassOfType(LTypeEl).DestType,ErrorEl);
       if (Result=cIncompatible) and RaiseOnIncompatible then
         RaiseMsg(20170216152501,nIncompatibleTypesGotExpected,sIncompatibleTypesGotExpected,
-          [RTypeEl.Name,'class of '+TPasClassOfType(LTypeEl).DestType.FullName],ErrorEl);
+          [RTypeEl.Name,'class of '+TPasClassOfType(LTypeEl).DestType.PathName],ErrorEl);
       // do not check rrfReadable -> exit
       exit;
       end;
@@ -17136,9 +17154,12 @@ begin
         if CheckElTypeCompatibility(LArray.ElType,RArray.ElType,prraAlias) then
           Result:=cExact
         else if RaiseOnIncompatible then
+          begin
+          GetIncompatibleTypeDesc(LArray.ElType,RArray.ElType,GotDesc,ExpDesc);
           RaiseMsg(20170328110050,nIncompatibleTypesGotExpected,sIncompatibleTypesGotExpected,
-            ['array of '+LArray.ElType.FullName,
-             'array of '+RArray.ElType.FullName],ErrorEl)
+            ['array of '+GotDesc,
+             'array of '+ExpDesc],ErrorEl)
+          end
         else
           exit(cIncompatible);
         end;

+ 6 - 6
packages/fcl-passrc/src/pastree.pp

@@ -147,10 +147,10 @@ type
       const Arg: Pointer); virtual;
     procedure ForEachChildCall(const aMethodCall: TOnForEachPasElement;
       const Arg: Pointer; Child: TPasElement; CheckParent: boolean); virtual;
-    function FullPath: string;
-    function ParentPath: string;
-    function FullName: string; virtual;         // Name including parent's names
-    function PathName: string; virtual;         // = Module.Name + FullName
+    function FullPath: string;                  // parent's names, if parent is not TPasDeclarations
+    function ParentPath: string;                // parent's names
+    function FullName: string; virtual;         // FullPath + Name
+    function PathName: string; virtual;         // = Module.Name + ParentPath
     function GetModule: TPasModule;
     function ElementTypeName: string; virtual;
     Function HintsString : String;
@@ -2256,7 +2256,7 @@ begin
   p := Parent;
   while Assigned(p) and not p.InheritsFrom(TPasDeclarations) do
   begin
-    if (not (p is TPasOverloadedProc)) and (Length(p.Name) > 0) then
+    if (p.Name<>'') and (Not (p is TPasOverloadedProc)) then
       if Length(Result) > 0 then
         Result := p.Name + '.' + Result
       else
@@ -2285,7 +2285,7 @@ begin
   p := Parent;
   while Assigned(p) do
   begin
-    if (Not (p is TPasOverloadedProc)) and (Length(p.Name) > 0) then
+    if (p.Name<>'') and (Not (p is TPasOverloadedProc)) then
       if Length(Result) > 0 then
         Result := p.Name + '.' + Result
       else

+ 1 - 0
packages/fcl-passrc/tests/tcresolver.pas

@@ -13296,6 +13296,7 @@ begin
   Add('  obj:=TObject(p);');
   Add('  cl:=TClass(p);');
   Add('  a:=TArrInt(p);');
+  Add('  p:=Pointer(a);');
   ParseProgram;
 end;
 

+ 7 - 11
packages/pastojs/src/fppas2js.pp

@@ -344,11 +344,7 @@ Works:
 - typecast byte(longword) -> value & $ff
 
 ToDos:
-- -SI<x>     Set interface style to <x>
-         -SIcom     COM compatible interface (default)
-         -SIcorba   CORBA compatible interface
 -Sm        Support macros like C (global)
--Sy        @<pointer> returns a typed pointer, same as $T+
 - writestr(out s: string; args); varargs;
 - widestrings + FPC_HAS_FEATURE_WIDESTRINGS + FPC_WIDESTRING_EQUAL_UNICODESTRING
 - check rtl.js version
@@ -2196,7 +2192,7 @@ begin
     ProcScope:=TPas2JSProcedureScope(El.CustomData);
     ProcScope.OverloadName:=NewName;
     if ProcScope.DeclarationProc<>nil then
-      RaiseInternalError(20180322233222,El.FullPath);
+      RaiseInternalError(20180322233222,GetElementDbgPath(El));
     if ProcScope.ImplProc<>nil then
       TPas2JSProcedureScope(ProcScope.ImplProc.CustomData).OverloadName:=NewName;
     end
@@ -3298,7 +3294,7 @@ var
   List: TStringList;
   Scope: TPas2JSClassScope;
 begin
-  Name:=El.FullName;
+  Name:=El.PathName;
   Scope:=TPas2JSClassScope(El.CustomData);
   if Scope.AncestorScope<>nil then
     begin
@@ -3744,7 +3740,7 @@ begin
         begin
         // use external class definition
         {$IFDEF VerbosePas2JS}
-        writeln('TPas2JSResolver.BI_TypeInfo_OnGetCallResult FindData.Found="',FindData.Found.FullName,'"');
+        writeln('TPas2JSResolver.BI_TypeInfo_OnGetCallResult FindData.Found="',FindData.Found.ParentPath,'"');
         {$ENDIF}
         SetResolverTypeExpr(ResolvedEl,btContext,FoundClass,TPasType(FindData.Found),[rrfReadable]);
         exit;
@@ -16794,7 +16790,7 @@ begin
             // missing JS var for Self
             {$IFDEF VerbosePas2JS}
             {AllowWriteln}
-            writeln('TPasToJSConverter.CreateReferencePath missing JS var for Self: El=',El.FullName,':',El.ClassName,' CurParentEl=',ParentEl.FullName,':',ParentEl.ClassName,' AContext:');
+            writeln('TPasToJSConverter.CreateReferencePath missing JS var for Self: El=',GetElementDbgPath(El),':',El.ClassName,' CurParentEl=',GetElementDbgPath(ParentEl),':',ParentEl.ClassName,' AContext:');
             AContext.WriteStack;
             if Ref<>nil then
               writeln('TPasToJSConverter.CreateReferencePath Ref=',GetObjName(Ref.Element),' at ',AContext.Resolver.GetElementSourcePosStr(Ref.Element));
@@ -18077,7 +18073,7 @@ var
 begin
   E:=EPas2JS.CreateFmt(MsgPattern,Args);
   {$IFDEF VerbosePas2JS}
-  writeln('TPasToJSConverter.DoError ',id,' ',El.FullName,':',El.ClassName,' Msg="',E.Message,'"');
+  writeln('TPasToJSConverter.DoError ',id,' ',GetElementDbgPath(El),':',El.ClassName,' Msg="',E.Message,'"');
   {$ENDIF}
   E.PasElement:=El;
   E.MsgNumber:=MsgNumber;
@@ -18093,7 +18089,7 @@ var
   E: EPas2JS;
 begin
   {$IFDEF VerbosePas2JS}
-  writeln('TPasToJSConverter.RaiseNotSupported ',id,' ',El.FullName,':',El.ClassName,' Msg="',Msg,'"');
+  writeln('TPasToJSConverter.RaiseNotSupported ',id,' ',GetElementDbgPath(El),':',El.ClassName,' Msg="',Msg,'"');
   {$ENDIF}
   if AContext=nil then ;
   E:=EPas2JS.CreateFmt(sPasElementNotSupported,[GetObjName(El)+' ['+IntToStr(Id)+']']);
@@ -18130,7 +18126,7 @@ begin
   s:='TPasToJSConverter.RaiseInconsistency['+IntToStr(Id)+']: you found a bug';
   if El<>nil then
     begin
-    s:=s+El.FullName;
+    s:=s+GetElementDbgPath(El);
     if El.Name<>'' then
       s:=s+El.Name
     else

+ 3 - 0
packages/pastojs/src/pas2jscompiler.pp

@@ -3133,6 +3133,8 @@ begin
                  ParamFatal('invalid include path (-Fi) "'+ErrorMsg+'"');
           'N': if not FileCache.AddNamespaces(String(p),FromCmdLine,ErrorMsg) then
                  ParamFatal('invalid namespace (-FN) "'+ErrorMsg+'"');
+          'r': if not Quick then
+                 Log.Log(mtNote,'-Fr not yet implemented');
           'u': if not FileCache.AddUnitPaths(String(p),FromCmdLine,ErrorMsg) then
                  ParamFatal('invalid unit path (-Fu) "'+ErrorMsg+'"');
           'U': FileCache.UnitOutputPath:=String(p);
@@ -3973,6 +3975,7 @@ begin
   l('   -Fi<x> : Add <x> to include paths');
   l('   -FN<x> : add <x> to namespaces. Namespaces with trailing - are removed.');
   l('            Delphi calls this flag "unit scope names".');
+  //l('   -Fr<x> : Load error message file <x>');
   l('   -Fu<x> : Add <x> to unit paths');
   l('   -FU<x> : Set unit output path to <x>');
   l('  -I<x>   : Add <x> to include paths, same as -Fi');

+ 1 - 1
packages/pastojs/src/pas2jsfiler.pp

@@ -2283,7 +2283,7 @@ procedure TPCUWriter.WriteModule(Obj: TJSONObject; aModule: TPasModule;
   begin
     {$IF defined(VerbosePJUFiler) or defined(VerbosePCUFiler) or defined(VerboseUnitQueue)}
     {AllowWriteln}
-    writeln('TPCUWriter.WriteModule Ref.Element=',GetElementFullPath(Ref.Element),' Pending=',GetObjName(Ref.Pending),' ErrorEl=',GetElementFullPath(Ref.Pending.ErrorEl));
+    writeln('TPCUWriter.WriteModule Ref.Element=',GetElementDbgPath(Ref.Element),' Pending=',GetObjName(Ref.Pending),' ErrorEl=',GetElementDbgPath(Ref.Pending.ErrorEl));
     if Ref.Pending is TPCUWriterPendingElRefObj then
       begin
       PendObj:=TPCUWriterPendingElRefObj(Ref.Pending);

+ 117 - 70
packages/pastojs/tests/tcmodules.pas

@@ -487,6 +487,7 @@ type
     Procedure TestExternalClass_BracketAccessor_MultiType;
     Procedure TestExternalClass_BracketAccessor_Index;
     Procedure TestExternalClass_ForInJSObject;
+    Procedure TestExternalClass_IncompatibleArgDuplicateIdentifier;
 
     // class interfaces
     Procedure TestClassInterface_Corba;
@@ -8522,8 +8523,8 @@ begin
   ConvertProgram;
   CheckSource('TestClass_TypeAlias',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IObject", "{5B8AD21A-8000-3000-8000-000000000000}", [], null);',
-    'rtl.createInterface($mod, "IBird", "{48DF66C6-FD76-3B15-A738-D462ECC63074}", [], $mod.IObject);',
+    'rtl.createInterface($mod, "IObject", "{B92D5841-6F2A-306A-8000-000000000000}", [], null);',
+    'rtl.createInterface($mod, "IBird", "{4B0D080B-C0F6-387B-AE88-F10981585074}", [], $mod.IObject);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -12814,7 +12815,7 @@ begin
   ConvertProgram;
   CheckSource('TestExternalClass_TypeCastToRootClass',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E00-3000-8000-000000000000}", [], null);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-B800-000000000000}", [], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -12884,8 +12885,8 @@ begin
   ConvertProgram;
   CheckSource('TestExternalClass_TypeCastToJSObject',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E00-3000-8000-000000000000}", [], null);',
-    'rtl.createInterface($mod, "IBird", "{48E3FF4A-AF76-3465-A738-D462ECC63074}", [], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-B800-000000000000}", [], null);',
+    'rtl.createInterface($mod, "IBird", "{4B0D080B-C0F6-396E-AE88-000B87785074}", [], $mod.IUnknown);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13207,24 +13208,67 @@ begin
   'type',
   '  TJSObject = class external name ''Object''',
   '  end;',
+  '  TJSArray = class external name ''Array''',
+  '  end;',
   'var',
   '  o: TJSObject;',
+  '  a: TJSArray;',
   '  key: string;',
   'begin',
   '  for key in o do',
   '    if key=''abc'' then ;',
+  '  for key in a do',
+  '    if key=''123'' then ;',
   '']);
   ConvertProgram;
   CheckSource('TestExternalClass_ForInJSObject',
     LinesToStr([ // statements
     'this.o = null;',
+    'this.a = null;',
     'this.key = "";',
     '']),
     LinesToStr([ // $mod.$main
     'for ($mod.key in $mod.o) if ($mod.key === "abc") ;',
+    'for ($mod.key in $mod.a) if ($mod.key === "123") ;',
     '']));
 end;
 
+procedure TTestModule.TestExternalClass_IncompatibleArgDuplicateIdentifier;
+begin
+  AddModuleWithIntfImplSrc('unit2.pas',
+    LinesToStr([
+    '{$modeswitch externalclass}',
+    'type',
+    '  TJSBufferSource = class external name ''BufferSource''',
+    '  end;',
+    'procedure DoIt(s: TJSBufferSource); external name ''DoIt'';',
+    '']),
+    '');
+  AddModuleWithIntfImplSrc('unit3.pas',
+    LinesToStr([
+    '{$modeswitch externalclass}',
+    'type',
+    '  TJSBufferSource = class external name ''BufferSource''',
+    '  end;',
+    '']),
+    '');
+
+  StartUnit(true);
+  Add([
+  'interface',
+  'uses unit2, unit3;',
+  'procedure DoSome(s: TJSBufferSource);',
+  'implementation',
+  'procedure DoSome(s: TJSBufferSource);',
+  'begin',
+  '  DoIt(s);',
+  'end;',
+  '']);
+  SetExpectedPasResolverError('Incompatible type arg no. 1: Got "unit3.TJSBufferSource", expected "unit2.TJSBufferSource"',
+    nIncompatibleTypeArgNo);
+  ConvertUnit;
+end;
+
 procedure TTestModule.TestClassInterface_Corba;
 begin
   StartProgram(false);
@@ -13258,7 +13302,7 @@ begin
   CheckSource('TestClassInterface_Corba',
     LinesToStr([ // statements
     'rtl.createInterface($mod, "IUnknown", "{00000000-0000-0000-C000-000000000046}", [], null);',
-    'rtl.createInterface($mod, "IBird", "{B0AF836B-4E58-31BA-A735-D744B6DAA205}", ["GetSize", "SetSize", "DoIt"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IBird", "{5BD1A53B-69BB-37EE-AF32-BEFB86D85B03}", ["GetSize", "SetSize", "DoIt"], $mod.IUnknown);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13328,8 +13372,8 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_Overloads',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E71-32CA-B8EF-650000000000}", ["DoIt", "DoIt$1"], null);',
-    'rtl.createInterface($mod, "IBird", "{D2E3FF4A-AF76-3468-AB38-EB26B77CE676}", ["DoIt$2"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-BDC4-8A2AE2C59400}", ["DoIt", "DoIt$1"], null);',
+    'rtl.createInterface($mod, "IBird", "{8285DD5E-EA3E-396E-AE88-000B86AABF05}", ["DoIt$2"], $mod.IUnknown);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13426,8 +13470,8 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_AncestorIntf',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E71-32CA-8000-000000000000}", ["DoIt"], null);',
-    'rtl.createInterface($mod, "IBird", "{585952B8-2CC8-3000-8000-000000000000}", ["Fly"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-BDC4-8A2800000000}", ["DoIt"], null);',
+    'rtl.createInterface($mod, "IBird", "{B92D5841-6264-3AE3-BF20-000000000000}", ["Fly"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13473,7 +13517,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_ImplReintroduce',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IBird", "{585952B8-EF65-3000-8000-000000000000}", ["DoIt"], null);',
+    'rtl.createInterface($mod, "IBird", "{B92D5841-6264-3AE2-8594-000000000000}", ["DoIt"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13530,8 +13574,8 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_MethodResolution',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E75-38F5-8000-000000000000}", ["Walk"], null);',
-    'rtl.createInterface($mod, "IBird", "{F8E3FF4A-AF76-3468-BB38-1CCFAB120092}", ["Walk$1", "Fly"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-BDD7-23D600000000}", ["Walk"], null);',
+    'rtl.createInterface($mod, "IBird", "{CF8A4986-80F6-396E-AE88-000B86AAE208}", ["Walk$1", "Fly"], $mod.IUnknown);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13584,9 +13628,9 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_AncestorLess',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-7588F5800000}", ["_AddRef", "Walk"], null);',
-    'rtl.createInterface($mod, "IBird", "{136757F2-AF76-3468-8338-1526EC563676}", [], $mod.IUnknown);',
-    'rtl.createInterface($mod, "IDog", "{136757F2-AF76-3468-8565-8D26EC563676}", [], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IUnknown", "{8F2D5841-758A-322B-BDDF-21CD521DD723}", ["_AddRef", "Walk"], null);',
+    'rtl.createInterface($mod, "IBird", "{CCE11D4C-6504-3AEE-AE88-000B86AAE675}", [], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IDog", "{CCE11D4C-6504-3AEE-AE88-000B8E5FC675}", [], $mod.IUnknown);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13644,11 +13688,11 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_Delegation',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E00-3000-8000-000000000000}", [], null);',
-    'rtl.createInterface($mod, "IBird", "{48E3FF4A-AF76-3465-A738-D745ABE63074}", ["Fly"], $mod.IUnknown);',
-    'rtl.createInterface($mod, "IEagle", "{56CEF525-B037-3078-82F5-4C3CF0629879}", [], $mod.IBird);',
-    'rtl.createInterface($mod, "IDove", "{56CEF525-B037-3078-8169-F7ECF0629879}", [], $mod.IBird);',
-    'rtl.createInterface($mod, "ISwallow", "{56CEF525-B037-3078-90A3-CCE44C629879}", [], $mod.IBird);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-B800-000000000000}", [], null);',
+    'rtl.createInterface($mod, "IBird", "{478D080B-C0F6-396E-AE88-000B87785B07}", ["Fly"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IEagle", "{489289DE-FDE2-34A6-8288-39119022B1B4}", [], $mod.IBird);',
+    'rtl.createInterface($mod, "IDove", "{489289DE-FDE2-34A6-8288-39118EF16074}", [], $mod.IBird);',
+    'rtl.createInterface($mod, "ISwallow", "{B89289DE-FDE2-34A6-8288-3911CBDCB359}", [], $mod.IBird);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13674,16 +13718,16 @@ begin
     '    $mod.TObject.$final.call(this);',
     '  };',
     '  this.$intfmaps = {',
-    '    "{48E3FF4A-AF76-3465-A738-D745ABE63074}": function () {',
+    '    "{478D080B-C0F6-396E-AE88-000B87785B07}": function () {',
     '        return this.FBirdIntf;',
     '      },',
-    '    "{56CEF525-B037-3078-82F5-4C3CF0629879}": function () {',
+    '    "{489289DE-FDE2-34A6-8288-39119022B1B4}": function () {',
     '        return this.GetEagleIntf();',
     '      },',
-    '    "{56CEF525-B037-3078-8169-F7ECF0629879}": function () {',
+    '    "{489289DE-FDE2-34A6-8288-39118EF16074}": function () {',
     '        return rtl.getIntfT(this.FDoveObj, $mod.IDove);',
     '      },',
-    '    "{56CEF525-B037-3078-90A3-CCE44C629879}": function () {',
+    '    "{B89289DE-FDE2-34A6-8288-3911CBDCB359}": function () {',
     '        return rtl.getIntfT(this.GetSwallowObj(), $mod.ISwallow);',
     '      }',
     '  };',
@@ -13732,11 +13776,11 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_DelegationStatic',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E00-3000-8000-000000000000}", [], null);',
-    'rtl.createInterface($mod, "IBird", "{48E3FF4A-AF76-3465-A738-D745ABE63074}", ["Fly"], $mod.IUnknown);',
-    'rtl.createInterface($mod, "IEagle", "{56CEF525-B037-3078-82F5-4C3CF0629879}", [], $mod.IBird);',
-    'rtl.createInterface($mod, "IDove", "{56CEF525-B037-3078-8169-F7ECF0629879}", [], $mod.IBird);',
-    'rtl.createInterface($mod, "ISwallow", "{56CEF525-B037-3078-90A3-CCE44C629879}", [], $mod.IBird);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-B800-000000000000}", [], null);',
+    'rtl.createInterface($mod, "IBird", "{478D080B-C0F6-396E-AE88-000B87785B07}", ["Fly"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IEagle", "{489289DE-FDE2-34A6-8288-39119022B1B4}", [], $mod.IBird);',
+    'rtl.createInterface($mod, "IDove", "{489289DE-FDE2-34A6-8288-39118EF16074}", [], $mod.IBird);',
+    'rtl.createInterface($mod, "ISwallow", "{B89289DE-FDE2-34A6-8288-3911CBDCB359}", [], $mod.IBird);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13754,16 +13798,16 @@ begin
     '  this.FBirdIntf = null;',
     '  this.FDoveObj = null;',
     '  this.$intfmaps = {',
-    '    "{48E3FF4A-AF76-3465-A738-D745ABE63074}": function () {',
+    '    "{478D080B-C0F6-396E-AE88-000B87785B07}": function () {',
     '        return this.FBirdIntf;',
     '      },',
-    '    "{56CEF525-B037-3078-82F5-4C3CF0629879}": function () {',
+    '    "{489289DE-FDE2-34A6-8288-39119022B1B4}": function () {',
     '        return this.$class.GetEagleIntf();',
     '      },',
-    '    "{56CEF525-B037-3078-8169-F7ECF0629879}": function () {',
+    '    "{489289DE-FDE2-34A6-8288-39118EF16074}": function () {',
     '        return rtl.getIntfT(this.FDoveObj, $mod.IDove);',
     '      },',
-    '    "{56CEF525-B037-3078-90A3-CCE44C629879}": function () {',
+    '    "{B89289DE-FDE2-34A6-8288-3911CBDCB359}": function () {',
     '        return rtl.getIntfT(this.$class.GetSwallowObj(), $mod.ISwallow);',
     '      }',
     '  };',
@@ -13823,8 +13867,8 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_Corba_Operators',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E00-3000-8000-000000000000}", [], null);',
-    'rtl.createInterface($mod, "IBird", "{8E3C13AF-8080-3465-A738-D7460F8FE995}", ["GetItems", "SetItems"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-B800-000000000000}", [], null);',
+    'rtl.createInterface($mod, "IBird", "{D53FED90-DE59-3202-B1AE-000B87785B08}", ["GetItems", "SetItems"], $mod.IUnknown);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13899,8 +13943,8 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_Corba_Args',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E00-3000-8000-000000000000}", [], null);',
-    'rtl.createInterface($mod, "IBird", "{48E3FF4A-AF76-3465-A738-D462ECC63074}", [], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-B800-000000000000}", [], null);',
+    'rtl.createInterface($mod, "IBird", "{4B0D080B-C0F6-396E-AE88-000B87785074}", [], $mod.IUnknown);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -13994,7 +14038,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_Corba_ForIn',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E00-3000-8000-000000000000}", [], null);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-B800-000000000000}", [], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '    this.Id = 0;',
@@ -14002,8 +14046,8 @@ begin
     '  this.$final = function () {',
     '  };',
     '});',
-    'rtl.createInterface($mod, "IEnumerator", "{D2FE11F3-D2CC-36BB-A5B2-66EB7FB5CB08}", ["GetCurrent", "MoveNext"], $mod.IUnknown);',
-    'rtl.createInterface($mod, "IEnumerable", "{D20534CB-D9C0-3EA5-AA60-ACEB7D726308}", ["GetEnumerator"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IEnumerator", "{95D7745D-ED61-3F13-BBE4-07708161999E}", ["GetCurrent", "MoveNext"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IEnumerable", "{8CC9D45D-ED7D-3B73-96B6-290B931BB19E}", ["GetEnumerator"], $mod.IUnknown);',
     'this.o = null;',
     'this.i = null;',
     '']),
@@ -14055,7 +14099,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_AssignVar',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-776A86A09328}", ["_AddRef", "_Release"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB0E1-758A-322B-BDDF-21CD521DDFA9}", ["_AddRef", "_Release"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -14114,7 +14158,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_AssignArg',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-776A86A09328}", ["_AddRef", "_Release"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB0E1-758A-322B-BDDF-21CD521DDFA9}", ["_AddRef", "_Release"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -14161,7 +14205,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_FunctionResult',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-776A86A09328}", ["_AddRef", "_Release"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB0E1-758A-322B-BDDF-21CD521DDFA9}", ["_AddRef", "_Release"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -14225,7 +14269,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_InheritedFuncResult',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-776A86A09328}", ["_AddRef", "_Release"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB0E1-758A-322B-BDDF-21CD521DDFA9}", ["_AddRef", "_Release"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -14297,7 +14341,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_IsAsTypeCasts',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-776A86A09328}", ["_AddRef", "_Release"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB0E1-758A-322B-BDDF-21CD521DDFA9}", ["_AddRef", "_Release"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -14359,7 +14403,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_PassAsArg',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-776A86A09328}", ["_AddRef", "_Release"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB0E1-758A-322B-BDDF-21CD521DDFA9}", ["_AddRef", "_Release"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -14471,7 +14515,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_PassToUntypedParam',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-776A86A09328}", ["_AddRef", "_Release"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB0E1-758A-322B-BDDF-21CD521DDFA9}", ["_AddRef", "_Release"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -14571,7 +14615,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_FunctionInExpr',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-776A86A09328}", ["_AddRef", "_Release"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB0E1-758A-322B-BDDF-21CD521DDFA9}", ["_AddRef", "_Release"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -14659,7 +14703,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_Property',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-776A86A09328}", ["_AddRef", "_Release"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB0E1-758A-322B-BDDF-21CD521DDFA9}", ["_AddRef", "_Release"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '    this.FAnt = null;',
@@ -14741,7 +14785,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_IntfProperty',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5406909F-9F0B-32A4-B98B-94CDDE493C91}", [',
+    'rtl.createInterface($mod, "IUnknown", "{385F5482-571B-338C-8130-4E97F330543B}", [',
     '  "_AddRef",',
     '  "_Release",',
     '  "GetBird",',
@@ -14821,11 +14865,11 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_Delegation',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E77-3872-9406-776A86A09328}", ["_AddRef", "_Release"], null);',
-    'rtl.createInterface($mod, "IBird", "{174B9F1B-B1BC-3868-8338-1709AB763676}", ["Fly"], $mod.IUnknown);',
-    'rtl.createInterface($mod, "IEagle", "{95CDEE63-AD4B-322E-B6F5-6C42ECD29875}", [], $mod.IBird);',
-    'rtl.createInterface($mod, "IDove", "{95CDEE63-AD4B-322E-B569-17F2ECD29875}", [], $mod.IBird);',
-    'rtl.createInterface($mod, "ISwallow", "{95CDEE63-AD4B-322E-84A4-ECEA48D29875}", [], $mod.IBird);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB0E1-758A-322B-BDDF-21CD521DDFA9}", ["_AddRef", "_Release"], null);',
+    'rtl.createInterface($mod, "IBird", "{CC440C7F-7623-3DEE-AE88-000B86AAF108}", ["Fly"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IEagle", "{4B6A41C9-B020-3D7C-B688-96D19022B1B4}", [], $mod.IBird);',
+    'rtl.createInterface($mod, "IDove", "{4B6A41C9-B020-3D7C-B688-96D18EF16074}", [], $mod.IBird);',
+    'rtl.createInterface($mod, "ISwallow", "{BB6A41C9-B020-3D7C-B688-96D1CBDCB359}", [], $mod.IBird);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -14851,16 +14895,16 @@ begin
     '    $mod.TObject.$final.call(this);',
     '  };',
     '  this.$intfmaps = {',
-    '    "{174B9F1B-B1BC-3868-8338-1709AB763676}": function () {',
+    '    "{CC440C7F-7623-3DEE-AE88-000B86AAF108}": function () {',
     '        return rtl._AddRef(this.FBirdIntf);',
     '      },',
-    '    "{95CDEE63-AD4B-322E-B6F5-6C42ECD29875}": function () {',
+    '    "{4B6A41C9-B020-3D7C-B688-96D19022B1B4}": function () {',
     '        return this.GetEagleIntf();',
     '      },',
-    '    "{95CDEE63-AD4B-322E-B569-17F2ECD29875}": function () {',
+    '    "{4B6A41C9-B020-3D7C-B688-96D18EF16074}": function () {',
     '        return rtl.queryIntfT(this.FDoveObj, $mod.IDove);',
     '      },',
-    '    "{95CDEE63-AD4B-322E-84A4-ECEA48D29875}": function () {',
+    '    "{BB6A41C9-B020-3D7C-B688-96D1CBDCB359}": function () {',
     '        return rtl.queryIntfT(this.GetSwallowObj(), $mod.ISwallow);',
     '      }',
     '  };',
@@ -14902,7 +14946,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_With',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{F1ACF9FE-4E77-3872-9406-776A86A09333}", ["_AddRef", "_Release", "GetAnt"], null);',
+    'rtl.createInterface($mod, "IUnknown", "{D7ADB00D-C6B6-39FB-BDDF-21CD521DDFA9}", ["_AddRef", "_Release", "GetAnt"], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -14955,7 +14999,7 @@ begin
   ConvertProgram;
   CheckSource('TestClassInterface_COM_ForIn',
     LinesToStr([ // statements
-    'rtl.createInterface($mod, "IUnknown", "{5D22E7CA-4E00-3000-8000-000000000000}", [], null);',
+    'rtl.createInterface($mod, "IUnknown", "{B92D5841-758A-322B-B800-000000000000}", [], null);',
     'rtl.createClass($mod, "TObject", null, function () {',
     '  this.$init = function () {',
     '    this.Id = 0;',
@@ -14963,8 +15007,8 @@ begin
     '  this.$final = function () {',
     '  };',
     '});',
-    'rtl.createInterface($mod, "IEnumerator", "{D2FE11F3-D2CC-36BB-A5B2-66EB7FB5CB08}", ["GetCurrent", "MoveNext"], $mod.IUnknown);',
-    'rtl.createInterface($mod, "IEnumerable", "{D20534CB-D9C0-3EA5-AA60-ACEB7D726308}", ["GetEnumerator"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IEnumerator", "{95D7745D-ED61-3F13-BBE4-07708161999E}", ["GetCurrent", "MoveNext"], $mod.IUnknown);',
+    'rtl.createInterface($mod, "IEnumerable", "{8CC9D45D-ED7D-3B73-96B6-290B931BB19E}", ["GetEnumerator"], $mod.IUnknown);',
     'this.o = null;',
     'this.i = null;',
     '']),
@@ -15059,7 +15103,7 @@ begin
     '};',
     '']),
     LinesToStr([ // implementation
-    'rtl.createInterface($impl, "IUnknown", "{5D22E7CA-4E77-3872-9406-000000000000}", ["_AddRef"], null);',
+    'rtl.createInterface($impl, "IUnknown", "{B92D5841-758A-322B-BDDF-21CD52180000}", ["_AddRef"], null);',
     'rtl.createClass($impl, "TObject", null, function () {',
     '  this.$init = function () {',
     '  };',
@@ -16653,7 +16697,9 @@ begin
   '  obj:=TObject(p);',
   '  c:=TClass(p);',
   '  a:=TArrInt(p);',
-  '  p:=n;']);
+  '  p:=n;',
+  '  p:=Pointer(a);',
+  '']);
   ConvertProgram;
   CheckSource('TestPointer',
     LinesToStr([ // statements
@@ -16685,6 +16731,7 @@ begin
     '$mod.C = $mod.p;',
     '$mod.a = $mod.p;',
     '$mod.p = null;',
+    '$mod.p = $mod.a;',
     '']));
 end;
 
@@ -20057,7 +20104,7 @@ begin
     'rtl.createInterface(',
     '  $mod,',
     '  "IUnknown",',
-    '  "{5D22E7CA-4E00-3000-8000-000000000000}",',
+    '  "{B92D5841-758A-322B-B800-000000000000}",',
     '  [],',
     '  null,',
     '  function () {',
@@ -20066,7 +20113,7 @@ begin
     'rtl.createInterface(',
     '  $mod,',
     '  "IBird",',
-    '  "{585952B8-45B2-3E86-BAC5-B22E86800000}",',
+    '  "{D32D5841-6264-3AE3-A2C9-B91CE922C9B9}",',
     '  ["GetItem", "SetItem"],',
     '  null,',
     '  function () {',
@@ -20130,7 +20177,7 @@ begin
     'rtl.createInterface(',
     '  $mod,',
     '  "IUnknown",',
-    '  "{06A53E33-DB48-3B02-9906-776A86A09333}",',
+    '  "{D7ADB00D-1A9B-3EDC-B123-730E661DDFA9}",',
     '  ["QueryInterface", "_AddRef", "_Release"],',
     '  null,',
     '  function () {',
@@ -20144,7 +20191,7 @@ begin
     'rtl.createInterface(',
     '  $mod,',
     '  "IBird",',
-    '  "{FF135A0E-7B4C-35B8-8737-674A0E33EF92}",',
+    '  "{9CC77572-0E45-3594-9A88-9E8D865C9E0A}",',
     '  ["GetItem", "SetItem"],',
     '  $mod.IUnknown,',
     '  function () {',