Advertisement

convertion problem - No conversion from 'A@&' to 'B@' available.

Started by February 15, 2013 08:38 AM
0 comments, last by WitchLord 11 years, 6 months ago

Hi smile.png

I think variant "b is a" - valid, but compiler say no


class A{}
class B : A{}


void startGame( string &param )
{
    A @a;
    B @b;
    
    if( a is b )
    {}
    
    if( b is a ) //  No conversion from 'A@&' to 'B@' available.
    {}
}
 

Yes, you're probably right. The compiler should probably try an implicit cast of the first operand if the implicit cast of the second operand is not possible.

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

This topic is closed to new replies.

Advertisement