It seems that WebSharper has some difficulties converting between integer types (say, int32
to uint64
). I get this:
error : Failed to translate a method call: ToUInt64(..) [Microsoft.FSharp.Core.Operators]
The same happens to int32
-> uint32
, int16
-> int32
and many others (only byte
<-> int32
seems to be working).
So, the question is: how do I get around this issue? I've got an integer i
(which is int32
since I can't get anything else) and now I want to get i
-th element from Uint8Array
. Uint8Array.Get
wants an uint64
. How do I convert my i
to uint64
?
I was going to use an [<Inline>]
cheat but that doesn't work either, because I get this error even if I try to return or to pass as an argument any integer different form int32
.