Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2019-09

Browser gives a "warning" when using interfaces

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

helioroots roots

Browser gives a "warning" when using interfaces, See in the image if the code after the return is necessary?

[image: Captura de tela_2019-09-25_08-02-35.png]
[image: Captura de tela_2019-09-25_08-03-56.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20190925/d5310bdf/attachment-0001.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: Captura de tela_2019-09-25_08-02-35.png
Type: image/png
Size: 18101 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20190925/d5310bdf/attachment-0002.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: Captura de tela_2019-09-25_08-03-56.png
Type: image/png
Size: 23200 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20190925/d5310bdf/attachment-0003.png>

Mattias Gaertner
to helioroots roots
Show quoted text 5 lines
Browser gives a "warning" when using interfaces, See in the image if the code after the return is necessary? [image: Captura de tela_2019-09-25_08-02-35.png] [image: Captura de tela_2019-09-25_08-03-56.png]

That is normal. The last lines are appended to any Pascal function. pas2js has no optimization yet to omit these statements.

See here for the list of possible optimizations and feature requests: https://wiki.lazarus.freepascal.org/Pas2js_optimizations

The wiki seems to be down at the moment.

Mattias