Skip to content

Commit fad9daa

Browse files
Update ops.py
1 parent fb5c2f4 commit fad9daa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypyc/ir/ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,9 +1047,9 @@ def __init__(self, src: Value, index: int, line: int = -1, *, borrow: bool = Fal
10471047
super().__init__(line)
10481048
self.src = src
10491049
self.index = index
1050-
assert isinstance(src.type, RTuple), "TupleGet only operates on tuples"
1050+
assert isinstance(src.type, RTuple), "TupleGet only operates on tuples, not {type(src.type).__name__}"
10511051
src_len = len(src.type.types)
1052-
assert -src_len <= index <= src_len - 1, f"source type: {src.type}\nindex: {index}"
1052+
assert -src_len <= index <= src_len - 1, f"Index out of range.\nsource type: {src.type}\nindex: {index}"
10531053
self.type = src.type.types[index]
10541054
self.is_borrowed = borrow
10551055

0 commit comments

Comments
 (0)