• 13
• 16
• 27
• 9
• 9

Issue with implicit const qualifier on member handle vs object

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

Recommended Posts

Hi there,

I have run into a strange issue that I can't seem to work around or find a solution for.  I'm hoping that someone may be able to shed some light on what's going on.  The code snippet to recreate the issue is very small:

class Interface {};
class Object : Interface {};

class Test
{
bool PerformTest() const
{
return m_interface is @m_object;
}

private Interface@ m_interface;
private Object m_object;
}


The compilation error is this: "No conversion from 'const Interface@const' to 'Interface@const' available.  Is there some issue with the const qualifier not being propagated to the object type of the handle?  Or is there something I am doing wrong?

Also note that if 'const' is removed from PerformTest this of course compiles fine, but then it is no longer const correct, so that is not a solution for me.

Edited by mbwac

Share on other sites

This is clearly a bug in the AngelScript compiler. I'll have it fixed a.s.a.p.

Thanks for taking the time to create a small test for reproducing the problem. It will make it much faster to find and fix the cause.

Share on other sites

I suspected it was a compiler bug.  Thanks for the quick response.

Share on other sites

I've fixed this in revision 2026. Thanks.