Browse Source

pastojs: typecast function result

git-svn-id: trunk@35811 -
Mattias Gaertner 8 years ago
parent
commit
0139308762
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/pastojs/tests/tcmodules.pas

+ 3 - 1
packages/pastojs/tests/tcmodules.pas

@@ -6919,9 +6919,10 @@ begin
   Add('  obj:=tcontrol(obj).next;');
   Add('  tcontrol(obj):=nil;');
   Add('  obj:=tcontrol(obj);');
+  Add('  tcontrol(obj):=tcontrol(tcontrol(obj).getit);');
   Add('  tcontrol(obj):=tcontrol(tcontrol(obj).getit());');
   Add('  tcontrol(obj):=tcontrol(tcontrol(obj).getit(1));');
-  Add('  tcontrol(obj):=tcontrol(tcontrol(tcontrol(obj).getit()).arr[2]);');
+  Add('  tcontrol(obj):=tcontrol(tcontrol(tcontrol(obj).getit).arr[2]);');
   ConvertProgram;
   CheckSource('TestClass_TypeCast',
     LinesToStr([ // statements
@@ -6956,6 +6957,7 @@ begin
     'this.Obj = null;',
     'this.Obj = this.Obj;',
     'this.Obj = this.Obj.GetIt(0);',
+    'this.Obj = this.Obj.GetIt(0);',
     'this.Obj = this.Obj.GetIt(1);',
     'this.Obj = this.Obj.GetIt(0).Arr[2];',
     '']));