diff --git a/hugr-py/src/hugr/_dfg.py b/hugr-py/src/hugr/_dfg.py index ee4ec1704..ccfeea822 100644 --- a/hugr-py/src/hugr/_dfg.py +++ b/hugr-py/src/hugr/_dfg.py @@ -178,7 +178,7 @@ def call( case FunctionKind(sig): signature = sig case _: - raise ValueError(f"Expected function type, got {f_kind}") + raise ValueError(f"Expected 'func' to be a function") call_op = ops.Call(signature, instantiation, type_args) call_n = self.hugr.add_node(call_op, self.parent_node, call_op.num_out) self.hugr.add_link(func.out(0), call_n.inp(call_op.function_port_offset()))