Recent change fixing "funtion overload between Obj@ and const Obj@" broke a lot of bindings

Started by
5 comments, last by WitchLord 3 months, 3 weeks ago

This commit ( https://github.com/codecat/angelscript-mirror/commit/3599b250cb1c0df820f38e71c91c7d46338cef90​ ) seemed to have broken a lot of my script bindings that relate to using ?&in parameters. For example:

[    ScriptEngine] [12:56:25] [VehicleState]  VehicleState/Debugger/Main.as (45, 2) : INFO : Compiling void TabPlayerStates()
[    ScriptEngine] [12:56:25] [VehicleState]  VehicleState/Debugger/Main.as (76, 4) :  ERR : Multiple matching signatures to 'UI::PushID(const wstring&)'
[    ScriptEngine] [12:56:25] [VehicleState]  VehicleState/Debugger/Main.as (76, 4) : INFO : void PushID(const ?&in)
[    ScriptEngine] [12:56:25] [VehicleState]  VehicleState/Debugger/Main.as (76, 4) : INFO : void PushID(const string&in id)

And:

[    ScriptEngine] [12:56:25] [PluginManager]  PluginManager/src/Interface/Tabs/Plugin.as (64, 2) : INFO : Compiling void PluginTab::CheckRequestChangelog()
[    ScriptEngine] [12:56:25] [PluginManager]  PluginManager/src/Interface/Tabs/Plugin.as (79, 5) :  ERR : Multiple matching signatures to 'warn(Json::Value@&)'
[    ScriptEngine] [12:56:25] [PluginManager]  PluginManager/src/Interface/Tabs/Plugin.as (79, 5) : INFO : void warn(const string&in)
[    ScriptEngine] [12:56:25] [PluginManager]  PluginManager/src/Interface/Tabs/Plugin.as (79, 5) : INFO : void warn(?&in)

Is this a bug or an expected consequence of the change? If it's expected, is there a better way for me to handle this, or perhaps an engine property that reverts this behavior?

Advertisement

This appears to be a bug, it was definitely not an intentional change.

May I ask what your conversion operators for wstring and Json::Value to string look like, i.e. the function signature? I'll try to reproduce this and understand why this is happening after the change in above commit.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Can you provide your engine configuration again? (see WriteConfigToFile from the helper functions add-on )

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I would also like to see the code for TabPlayerStates and PluginTab::CheckRequestChangelog, especially the code related to the error messages.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Relevant string behavior & methods:

void f(const wstring &in) // Constructor
wstring opImplConv() const // Method

For wstring:

void f(const string &in) // Constructor
string opImplConv() const // Method

For Json::Value:

Value@ f(const ?&in) // Factory
string opImplConv() const // Method

The source code for TabPlayerStates: https://github.com/openplanet-nl/vehiclestate/blob/3d106901a5e6b0c932bf08be00ded7b51fc50e1e/Debugger/Main.as#L76

The source code for CheckRequestChangelog: https://github.com/openplanet-nl/plugin-manager/blob/c1d86473d0cb5a8f27591f7e5edb3f8b0ae2a6c5/src/Interface/Tabs/Plugin.as#L79​

Let me know if you still need the WriteConfigToFile output. Takes me a bit longer to set up :D

I've fixed this in 2877. Let me know if you have any more issues.

Thanks,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement