Advertisement

Issue with implicit const qualifier on member handle vs object

Started by October 24, 2014 04:24 PM
3 comments, last by mbwac 10 years, 1 month ago

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!

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.

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

Advertisement

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

I've fixed this in revision 2026. Thanks.

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

Thanks!

This topic is closed to new replies.

Advertisement