Jump to content
  • Advertisement
Sign in to follow this  
mbwac

Issue with implicit const qualifier on member handle vs object

This topic is 1513 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

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.

 

Thanks for your help!

Edited by mbwac

Share this post


Link to post
Share on other sites
Advertisement

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 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!