From e10b1d18ae766bfd89b421c27584b5336dde5ac2 Mon Sep 17 00:00:00 2001 From: Seyon Sivarajah Date: Tue, 18 Jun 2024 15:39:06 +0100 Subject: [PATCH] copy when flipping function type --- hugr-py/src/hugr/_tys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugr-py/src/hugr/_tys.py b/hugr-py/src/hugr/_tys.py index fa550e446..7b0fa2335 100644 --- a/hugr-py/src/hugr/_tys.py +++ b/hugr-py/src/hugr/_tys.py @@ -238,7 +238,7 @@ def empty(cls) -> FunctionType: return cls(input=[], output=[]) def flip(self) -> FunctionType: - return FunctionType(input=self.output, output=self.input) + return FunctionType(input=list(self.output), output=list(self.input)) @dataclass(frozen=True)