[Pas2js] Pas2js fails to produce valid code for default constructor expressed with empty parentheses...
Frameworks
developer.frameworks at gmail.com
Fri Jul 20 10:03:42 CEST 2018
Hello,
The tests carried out within the attached Delphi unit test project (a
single .DPR created with TMS WEB Core v0.9.8.3) demonstrate an apparent bug
in Pas2js v0.9.32+beta wherein the default constructor of an object of any
class type (i.e., a constructor having no arguments) fails IFF said
constructor is invoked with empty parentheses:
//
// TObject.Create( ); // <--- this fails in browser
//
// rather than simply:
//
// TObject.Create; // <--- this does not fail in browser
//
Per the attached project which tests default creation of a TObject,
TStringList and TWebDataModule (each with and without empty parentheses),
this issue has been confirmed on the latest versions of Chrome and FireFox
running on Windows 10. As "Create( );" is indeed valid Pascal code and not
to antagonize those Pascal language purists (like me ;-) who hate to chase
such non-obvious YET seriously annoying bugs, this issue should be fixed
soon (please).
Appreciatively,
J Ralston
Frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20180720/1dfc27d6/attachment-0002.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20180720/1dfc27d6/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RFI._Type._TEST.dpr
Type: application/octet-stream
Size: 6495 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20180720/1dfc27d6/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RFI._Type._TEST.dproj
Type: application/octet-stream
Size: 28403 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20180720/1dfc27d6/attachment-0003.obj>
More information about the Pas2js
mailing list