vm/emit: improve error message

Show unsupported type instead of value.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgeniy Stratonikov 2021-07-22 14:23:31 +03:00
parent 520133aee2
commit 808c30e7d7

View file

@ -96,7 +96,7 @@ func Array(w *io.BinWriter, es ...interface{}) {
Bool(w, e) Bool(w, e)
default: default:
if es[i] != nil { if es[i] != nil {
w.Err = fmt.Errorf("unsupported type: %v", e) w.Err = fmt.Errorf("unsupported type: %T", e)
return return
} }
Opcodes(w, opcode.PUSHNULL) Opcodes(w, opcode.PUSHNULL)