Hi , 
there is a compiler error on the code bellow, 
is any reason to avoid this type of code? Or it is a bug ?



package org.comp
{
        public class ToStringImp
        {
                public static function toString(str:String):String
                {
                        return str;
                }
        }
}


package org.comp
{
        import org.apache.royale.events.EventDispatcher;
        import org.apache.royale.events.IEventDispatcher;
        
        public class CompError extends EventDispatcher
        {
                public function CompError(target:IEventDispatcher=null)
                {
                        super(target);
                }
                
                override public function toString():String
                {
                        
                        //compiler message : 
                        //1137: Incorrect number of arguments.  Expected no
more than 0     
                        return ToStringImp.toString("some string value");
                }
        }
}

Thanks , 

Spiros 











Reply via email to