You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
assemblyscritt 0.28.2. Decoder.ts "Conversion from type 'i32' to 'u8' requires an explicit cast." #15
Upon compilation I receive a bunch of following errors:
ERROR AS200: Conversion from type 'i32' to 'u8' requires an explicit cast.
:
378 │ case Format.NIL:
│ ~~~~~~~~~~
└─ in ~lib/@wapc/as-msgpack/assembly/decoder.ts(378,12)
Error occurs on every switch statement that uses a value obtained from this.reader.getUint8();
For example:
readInt64(): i64 {
const prefix = this.reader.getUint8();
// ...
switch (prefix) {
case Format.INT8: // error
return <i64>this.reader.getInt8();
case Format.INT16: // error
return <i64>this.reader.getInt16();
// <rest of the code>
I managed to resolve the issue by adding explicit conversion:
Activity