Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
simplified the error message sources
  • Loading branch information
Nicholas J Riasanovsky
Nicholas J Riasanovsky committed Apr 18, 2022
commit cd04a5e451ee4d381042ccbbfed38dda846ff0da
14 changes: 10 additions & 4 deletions numba/core/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,8 @@ def _call_function_ex_replace_args_large(
else:
# There must always be an initial assignement
# https://github.com/numba/numba/blob/59fa2e335be68148b3bd72a29de3ff011430038d/numba/core/interpreter.py#L259-L260
# If this changes we may need to support this branch. We can
# reach this section if there is an unsupported conversion due
# to a failure in the list_to_tuple conversion.
raise UnsupportedError(errmsg)
# If this changes we may need to support this branch.
raise AssertionError("unreachable")
start_not_found = True
# Traverse backwards to find all concatentations
# until eventually reaching the original empty tuple.
Expand Down Expand Up @@ -623,6 +621,14 @@ def peep_hole_call_function_ex_to_call_function_kw(func_ir):
vararg_loc,
func_ir,
)
elif (
isinstance(args_def.value, ir.Expr)
and args_def.value.op == "list_to_tuple"
):
# If there is a call with vararg we need to check
# if the list -> tuple conversion failed and if so
# throw an error.
raise UnsupportedError(errmsg)
else:
# Here the IR is an initial empty build_tuple.
# Then for each arg, a new tuple with a single
Expand Down