[#11] morph: Return nil on Any stack item array type

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-24 17:05:22 +03:00 committed by Alex Vanin
parent f71d64435e
commit 9e30a87022

View file

@ -94,6 +94,10 @@ func ArrayFromStackParameter(param sc.Parameter) ([]sc.Parameter, error) {
}
if param.Type != sc.ArrayType {
if param.Type == sc.AnyType && param.Value == nil {
return nil, nil
}
return nil, errors.Errorf("chain/client: %s is not an array type", param.Type)
}