Browse Source

pastojs: pass impl uses as [] instead of null

git-svn-id: trunk@46806 -
Mattias Gaertner 4 năm trước cách đây
mục cha
commit
9d3daca70c
2 tập tin đã thay đổi với 7 bổ sung7 xóa
  1. 1 1
      packages/pastojs/src/fppas2js.pp
  2. 6 6
      packages/pastojs/tests/tcgenerics.pas

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

@@ -7756,7 +7756,7 @@ begin
         begin
         // add param
         if not HasImplUsesClause then
-          ArgArray.AddElement(CreateLiteralNull(El));
+          ArgArray.AddElement(CreateElement(TJSArrayLiteral,El));
         ArgArray.AddElement(ImplFunc);
         end;
       end;

+ 6 - 6
packages/pastojs/tests/tcgenerics.pas

@@ -259,7 +259,7 @@ begin
     '  $mod.$init = function () {',
     '    $impl.f.x.b = $impl.f.x.b + 10;',
     '  };',
-    '}, null, function () {',
+    '}, [], function () {',
     '  var $mod = this;',
     '  var $impl = $mod.$impl;',
     '  rtl.recNewT($impl, "TBird", function () {',
@@ -1154,7 +1154,7 @@ begin
     '  $mod.$init = function () {',
     '    $impl.f.x.b = $impl.f.x.b + 10;',
     '  };',
-    '}, null, function () {',
+    '}, [], function () {',
     '  var $mod = this;',
     '  var $impl = $mod.$impl;',
     '  rtl.recNewT($impl, "TBird", function () {',
@@ -1366,7 +1366,7 @@ begin
     '  $mod.$init = function () {',
     '    $impl.f.x.b = $impl.f.x.b + 10;',
     '  };',
-    '}, null, function () {',
+    '}, [], function () {',
     '  var $mod = this;',
     '  var $impl = $mod.$impl;',
     '  rtl.recNewT($impl, "TBird", function () {',
@@ -1560,7 +1560,7 @@ begin
     '      $impl.DoIt();',
     '    };',
     '  });',
-    '}, null, function () {',
+    '}, [], function () {',
     '  var $mod = this;',
     '  var $impl = $mod.$impl;',
     '  $impl.DoIt = function () {',
@@ -2086,7 +2086,7 @@ begin
     '    $impl.d[0].b = $impl.s[0].b;',
     '    $impl.s = $mod.TStatic$G1$clone($impl.s);',
     '  };',
-    '}, null, function () {',
+    '}, [], function () {',
     '  var $mod = this;',
     '  var $impl = $mod.$impl;',
     '  rtl.recNewT($impl, "TBird", function () {',
@@ -2209,7 +2209,7 @@ begin
     '    $impl.b.$assign($impl.f($impl.b));',
     '    $impl.p = $mod.$rtti["TAnt<UnitA.TBird>"];',
     '  };',
-    '}, null, function () {',
+    '}, [], function () {',
     '  var $mod = this;',
     '  var $impl = $mod.$impl;',
     '  rtl.recNewT($impl, "TBird", function () {',