Jump to content
  • Advertisement
Sign in to follow this  
Sir Ementaler

Assert failure when passing function handle by reference.

This topic is 870 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Edited by Sir Ementaler

Share this post


Link to post
Share on other sites
Advertisement

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!