🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Assert failure when passing function handle by reference.

Started by
1 comment, last by WitchLord 8 years, 3 months ago

I wasn't able to tell what the problem is here, but this code reliably reproduces it in AngelScript 2.31.0:


funcdef void f();
class foo {
	void opAssign(f@ &in) {}
}
void main() {
	foo bar = main;
}

Only happens with operator overloads.

Advertisement

Thanks. I'll look into this.

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've fixed this in revision 2301.

In this case the assert was correct. The if-condition was wrong. Funcdefs should fall in the first case, since they cannot be copied and only an extra handle should be created to guarantee the lifetime of the function during the call.

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