Skip to content

Commit

Permalink
replace uses
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed May 4, 2024
1 parent ea9d8b9 commit 507137f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vyper/codegen/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(self, node, context, is_stmt=False):

def parse_Int(self):
typ = self.expr._metadata["type"]
return IRnode.from_list(self.expr.n, typ=typ)
return IRnode.from_list(self.expr.value, typ=typ)

def parse_Decimal(self):
val = self.expr.value * DECIMAL_DIVISOR
Expand Down Expand Up @@ -133,8 +133,8 @@ def parse_Str(self):

# Byte literals
def parse_Bytes(self):
bytez = self.expr.s
bytez_length = len(self.expr.s)
bytez = self.expr.value
bytez_length = len(self.expr.value)
typ = BytesT(bytez_length)
return self._make_bytelike(typ, bytez, bytez_length)

Expand Down Expand Up @@ -345,7 +345,7 @@ def parse_Subscript(self):
elif is_tuple_like(sub.typ):
# should we annotate expr.slice in the frontend with the
# folded value instead of calling reduced() here?
index = self.expr.slice.reduced().n
index = self.expr.slice.reduced().value
# note: this check should also happen in get_element_ptr
if not 0 <= index < len(sub.typ.member_types):
raise TypeCheckFailure("unreachable")
Expand Down

0 comments on commit 507137f

Please sign in to comment.