bug: VerifyError: Error #1068: Number and int cannot be reconciled.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug: VerifyError: Error #1068: Number and int cannot be reconciled.

Michael Baczynski-2
to reproduce compile the class below with
haxe foo.swf -swf9 -swf-version 10 Main

class Main
{
     public static function main():Void
     {
         var i = 10;
         var j = wrap(i, 0, 10);
     }

     inline public static function wrap(x:Float, min:Float, max:Float):Float
     {
         return x < min ? (x - min) + max : ((x > max) ? (x - max) + min
: x);
     }
}

best,
michael

--
http://www.polygonal.de

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: bug: VerifyError: Error #1068: Number and int cannot be reconciled.

Jan_Flanders
Hi,
Change at least one 10 to 10.0

10 is Int
10.0 is Float

Cheers,
Jan

On Tue, Oct 13, 2009 at 3:33 PM, Michael Baczynski <[hidden email]> wrote:
to reproduce compile the class below with
haxe foo.swf -swf9 -swf-version 10 Main

class Main
{
   public static function main():Void
   {
       var i = 10;
       var j = wrap(i, 0, 10);
   }

   inline public static function wrap(x:Float, min:Float, max:Float):Float
   {
       return x < min ? (x - min) + max : ((x > max) ? (x - max) + min : x);
   }
}

best,
michael

--
http://www.polygonal.de

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: bug: VerifyError: Error #1068: Number and int cannot be reconciled.

Michael Baczynski-2
On 13.10.2009 16:05, ad nez wrote:
> Hi,
> Change at least one 10 to 10.0
>
> 10 is Int
> 10.0 is Float

yes, but shouldn't the compiler handle this? besides removing the inline
keyword solves the problem..

>
> Cheers,
> Jan
>
> On Tue, Oct 13, 2009 at 3:33 PM, Michael Baczynski
> <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     to reproduce compile the class below with
>     haxe foo.swf -swf9 -swf-version 10 Main
>
>     class Main
>     {
>        public static function main():Void
>        {
>            var i = 10;
>            var j = wrap(i, 0, 10);
>        }
>
>        inline public static function wrap(x:Float, min:Float,
>     max:Float):Float
>        {
>            return x < min ? (x - min) + max : ((x > max) ? (x - max) +
>     min : x);
>        }
>     }
>
>     best,
>     michael
>
>     --
>     http://www.polygonal.de
>
>     --
>     haXe - an open source web programming language
>     http://haxe.org
>
>


--
http://www.polygonal.de


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: bug: VerifyError: Error #1068: Number and int cannot be reconciled.

edA-qa mort-ora-y
In reply to this post by Michael Baczynski-2
Michael Baczynski wrote:
>         var j = wrap(i, 0, 10);
>     inline public static function wrap(x:Float, min:Float, max:Float):Float

I think this might be very similar to an error I reported about inline
functions and type conversion.  You can try the newest CVS version of
haxe to see if it goes away (Nicolas fixed my related bug).

--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

BigTPoker uses haXe and DHLIB
        http://BigTPoker.com/?source=haxe-list

The dis-Emi-A haXe Library
        http://wiki.disemia.com/HaXe
       
A full set of tools, classes, and support facilities aimed at
simplifying and expediting game creation in Flash 9.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.


--
haXe - an open source web programming language
http://haxe.org

signature.asc (260 bytes) Download Attachment