From d2f4d08485367db51e5e0a25af5bc67806bf736e Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Mon, 8 May 2023 22:28:54 +0800 Subject: [PATCH] use _BytestringT --- vyper/builtins/_convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vyper/builtins/_convert.py b/vyper/builtins/_convert.py index 3fc12c6c20..546207072a 100644 --- a/vyper/builtins/_convert.py +++ b/vyper/builtins/_convert.py @@ -267,7 +267,7 @@ def _literal_decimal(expr, arg_typ, out_typ): def to_bool(expr, arg, out_typ): _check_bytes(expr, arg, out_typ, 32) # should we restrict to Bytes[1]? - if isinstance(arg.typ, (BytesT, StringT)): + if isinstance(arg.typ, _BytestringT): # no clamp. checks for any nonzero bytes. arg = _bytes_to_num(arg, out_typ, signed=False)