-
Notifications
You must be signed in to change notification settings - Fork 195
Description
In FPC 3.0 and higher, calling constructors from a script doesn't work anymore. Reverting to FPC 2.6.4 (Lazarus 1.4) makes the script work again. I reported this to Lazarus bugtracker and was suggested some code in PascalScript needs to be changed:
"You should file a bug report against PascalScript. It relies on assumptions about the code generation, which we cannot support nor can guarantee to remain unchanged across releases."
There is a demo at the bugreport that shows the error: https://bugs.freepascal.org/view.php?id=31234
However, if the objects are created within the main program it works to access and use them from the script. At the Lazarus forum, user Derek Evans came up with a workaround that might be of help understanding how to resolve this bug: http://forum.lazarus-ide.org/index.php?topic=33302.msg215566#msg215566
I got a thought, that this might be a sideeffect of the FPC 3 changes regarding strings.
A Lazarus project of mine depends on PascalScript and I would be grateful if someone could look at this.