Closed
Description
I get this error when compiling example here (clicking Deploy):
https://studio.nearprotocol.com/?f=mpijex6n4
ERROR AS200: Conversion from type '__near_JSONHandler_Todo' to '__near_JSONHandler_Todo' requires an explicit cast.
handler.decoder = new JSONDecoder<__near_JSONHandler_Todo>(handler);
~~~~~~~
in ../out/model.near.ts(79,65)
Code snippet with problem is:
export function __near_decode_Todo(
buffer: Uint8Array, state: DecoderState):wrapped_Todo {
let handler = new __near_JSONHandler_Todo();
handler.buffer = buffer;
handler.decoder = new JSONDecoder<__near_JSONHandler_Todo>(handler);
handler.decoder.deserialize(buffer, state);
return handler.value;
}
Note clear why these types are treated as different.