From 3adb4150f4eaba72e54ba5a0f776b94e7352eacc Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 15 Jun 2015 17:16:44 +0300 Subject: [PATCH] Fix type of Call. --- artiq/py2llvm/typing.py | 3 +++ lit-test/py2llvm/typing/gcd.py | 1 + 2 files changed, 4 insertions(+) diff --git a/artiq/py2llvm/typing.py b/artiq/py2llvm/typing.py index cb1009050..3ceae8eb3 100644 --- a/artiq/py2llvm/typing.py +++ b/artiq/py2llvm/typing.py @@ -788,6 +788,9 @@ class Inferencer(algorithm.Visitor): self.engine.process(diag) return + self._unify(node.type, typ.ret, + node.loc, None) + def visit_LambdaT(self, node): self.generic_visit(node) signature_type = self._type_from_arguments(node.args, node.body.type) diff --git a/lit-test/py2llvm/typing/gcd.py b/lit-test/py2llvm/typing/gcd.py index 7433443be..08c589535 100644 --- a/lit-test/py2llvm/typing/gcd.py +++ b/lit-test/py2llvm/typing/gcd.py @@ -9,4 +9,5 @@ def _gcd(a, b): b = c return b +# CHECK-L: _gcd:(a:int(width='a), b:int(width='a))->int(width='a)(10:int(width='a), 25:int(width='a)):int(width='a) _gcd(10, 25)