From 549c110e7ceb0f499a82003fec6121b8cae79966 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 4 Jul 2015 04:27:24 +0300 Subject: [PATCH] Fix types.TFunction.fold. --- artiq/compiler/types.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/compiler/types.py b/artiq/compiler/types.py index 7e8c611f6..eb89809b1 100644 --- a/artiq/compiler/types.py +++ b/artiq/compiler/types.py @@ -194,15 +194,15 @@ class TFunction(Type): def fold(self, accum, fn): for arg in self.args: - accum = arg.fold(accum, fn) + accum = self.args[arg].fold(accum, fn) for optarg in self.optargs: accum = self.optargs[optarg].fold(accum, fn) accum = self.ret.fold(accum, fn) return fn(accum, self) def __repr__(self): - return "py2llvm.types.TFunction(%s, %s, %s)" % \ - (repr(self.args), repr(self.optargs), repr(self.ret)) + return "py2llvm.types.TFunction({}, {}, {})".format( + repr(self.args), repr(self.optargs), repr(self.ret)) def __eq__(self, other): return isinstance(other, TFunction) and \