Browse Source

pastojs: fixed test TestExternalClass_SameNamePublishedProperty

mattias 4 years ago
parent
commit
0bfef62666
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/packages/pastojs/tests/tcmodules.pas

+ 5 - 0
compiler/packages/pastojs/tests/tcmodules.pas

@@ -16975,6 +16975,7 @@ end;
 
 
 procedure TTestModule.TestExternalClass_SameNamePublishedProperty;
 procedure TTestModule.TestExternalClass_SameNamePublishedProperty;
 begin
 begin
+  WithTypeInfo:=true;
   StartProgram(false);
   StartProgram(false);
   Add([
   Add([
   '{$modeswitch externalclass}',
   '{$modeswitch externalclass}',
@@ -16990,10 +16991,14 @@ begin
   '  end;',
   '  end;',
   'begin',
   'begin',
   '  JSwiper.new;',
   '  JSwiper.new;',
+  //'  if typeinfo(JSwiper)=nil then ;',
   '']);
   '']);
   ConvertProgram;
   ConvertProgram;
   CheckSource('TestExternalClass_SameNamePublishedProperty',
   CheckSource('TestExternalClass_SameNamePublishedProperty',
     LinesToStr([ // statements
     LinesToStr([ // statements
+    'this.$rtti.$ExtClass("JSwiper", {',
+    '  jsclass: "Swiper"',
+    '});',
     'rtl.createClass(this, "TObject", null, function () {',
     'rtl.createClass(this, "TObject", null, function () {',
     '  this.$init = function () {',
     '  this.$init = function () {',
     '    this.FSwiper = null;',
     '    this.FSwiper = null;',