View Issue Details

IDProjectCategoryView StatusLast Update
0038281pas2jstranspilerpublic2020-12-30 17:15
Reporterhenrique Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformPas2JsOSWindows 
Summary0038281: Function not running
DescriptionWhen I do type conversion, to a generic, the function that returns it, in JS does not place the parentheses, on line 35 of the generated JS file.
Additional InformationGenerated file:
rtl.module("System",[],function () {
  "use strict";
  var $mod = this;
  rtl.createClass(this,"TObject",null,function () {
    this.$init = function () {
    };
    this.$final = function () {
    };
    this.Create = function () {
      return this;
    };
    this.AfterConstruction = function () {
    };
    this.BeforeDestruction = function () {
    };
  });
  $mod.$init = function () {
    rtl.exitcode = 0;
  };
});
rtl.module("UnitError",["System"],function () {
  "use strict";
  var $mod = this;
  var $impl = $mod.$impl;
  rtl.createClass(this,"TMyClass",pas.System.TObject,function () {
    this.AFunction = function () {
      var Result = undefined;
      Result = pas.System.TObject.$create("Create");
      return Result;
    };
  });
  this.MakeError = function () {
    var MyClass = null;
    MyClass = $mod.TMyClass.$create("Create");
    $impl.Error(MyClass.AFunction);
  };
  $mod.$implcode = function () {
    $impl.Error = function (Arr) {
    };
  };
},[]);
rtl.module("program",["System","UnitError"],function () {
  "use strict";
  var $mod = this;
  $mod.$main = function () {
    pas.UnitError.MakeError();
  };
});
TagsNo tags attached.
Fixed in Revision47914.
Attached Files

Activities

Mattias Gaertner

2020-12-30 15:08

manager   ~0127940

Where is the Pascal code?

henrique

2020-12-30 15:11

reporter   ~0127941

Sorry, is here :D
Error.zip (579 bytes)

Mattias Gaertner

2020-12-30 17:15

manager   ~0127945

Thanks for the nice bug examples.

Issue History

Date Modified Username Field Change
2020-12-30 13:01 henrique New Issue
2020-12-30 15:03 Mattias Gaertner Assigned To => Mattias Gaertner
2020-12-30 15:03 Mattias Gaertner Status new => assigned
2020-12-30 15:08 Mattias Gaertner Status assigned => feedback
2020-12-30 15:08 Mattias Gaertner Note Added: 0127940
2020-12-30 15:11 henrique Note Added: 0127941
2020-12-30 15:11 henrique File Added: Error.zip
2020-12-30 15:11 henrique Status feedback => assigned
2020-12-30 17:15 Mattias Gaertner Status assigned => resolved
2020-12-30 17:15 Mattias Gaertner Resolution open => fixed
2020-12-30 17:15 Mattias Gaertner Fixed in Revision => 47914.
2020-12-30 17:15 Mattias Gaertner Note Added: 0127945