[Pas2js] Pas2js fails to produce valid code for default constructor expressed with empty parentheses... (techsupport)
Frameworks
developer.frameworks at gmail.com
Fri Jul 20 15:01:48 CEST 2018
Corrected/clarified DPR project file attached now distinguishing local "l'TestObject (used to hold a reference to each class instance whose default constructor is being tested with and without empty parentheses) from the unit global "g" test fixture status variables used to track test progress/results -- apologies for any confusion.
On Fri, Jul 20, 2018 at 4:03 AM, Frameworks <developer.frameworks at gmail.com <mailto:developer.frameworks at gmail.com> > wrote:
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/d6ce22c5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RFI._Type._TEST.dpr
Type: application/octet-stream
Size: 6297 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20180720/d6ce22c5/attachment.obj>
More information about the Pas2js
mailing list