Commit 061dbfe3 authored by Robert Bradshaw's avatar Robert Bradshaw

More type inference fixes.

parent f0859e96
...@@ -3253,6 +3253,11 @@ class CallNode(ExprNode): ...@@ -3253,6 +3253,11 @@ class CallNode(ExprNode):
return result_type return result_type
return py_object_type return py_object_type
def type_dependencies(self, env):
# TODO: Update when Danilo's C++ code merged in to handle the
# the case of function overloading.
return self.function.type_dependencies(env)
def may_be_none(self): def may_be_none(self):
if self.may_return_none is not None: if self.may_return_none is not None:
return self.may_return_none return self.may_return_none
...@@ -3325,11 +3330,6 @@ class SimpleCallNode(CallNode): ...@@ -3325,11 +3330,6 @@ class SimpleCallNode(CallNode):
except Exception, e: except Exception, e:
self.compile_time_value_error(e) self.compile_time_value_error(e)
def type_dependencies(self, env):
# TODO: Update when Danilo's C++ code merged in to handle the
# the case of function overloading.
return self.function.type_dependencies(env)
def analyse_as_type(self, env): def analyse_as_type(self, env):
attr = self.function.as_cython_attribute() attr = self.function.as_cython_attribute()
if attr == 'pointer': if attr == 'pointer':
......
...@@ -593,6 +593,10 @@ def with_statement_untyped(): ...@@ -593,6 +593,10 @@ def with_statement_untyped():
print(typeof(x)) print(typeof(x))
return x return x
def self_lookup(a):
b = a
b = b.foo(keyword=None)
print typeof(b)
# Regression test for trac #638. # Regression test for trac #638.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment