Commit 9ec9a66f authored by Mark Florisson's avatar Mark Florisson

Pass some more tests

parent a17fac09
...@@ -22,6 +22,8 @@ class CythonScope(ModuleScope): ...@@ -22,6 +22,8 @@ class CythonScope(ModuleScope):
if type: if type:
return type return type
return super(CythonScope, self).lookup_type(name)
def create_cython_scope(context): def create_cython_scope(context):
create_utility_scope(context) create_utility_scope(context)
return CythonScope(context) return CythonScope(context)
......
...@@ -3823,6 +3823,7 @@ class SingleAssignmentNode(AssignmentNode): ...@@ -3823,6 +3823,7 @@ class SingleAssignmentNode(AssignmentNode):
# See if we're dealing with this: # See if we're dealing with this:
# dtype = cython.typedef(cython.fused_type(...)) # dtype = cython.typedef(cython.fused_type(...))
if isinstance(args[0], ExprNodes.SimpleCallNode):
nested_func_name = args[0].function.as_cython_attribute() nested_func_name = args[0].function.as_cython_attribute()
if nested_func_name == u'fused_type': if nested_func_name == u'fused_type':
nested_args, nested_kwds = args[0].explicit_args_kwds() nested_args, nested_kwds = args[0].explicit_args_kwds()
......
...@@ -270,7 +270,7 @@ class SimpleAssignmentTypeInferer(object): ...@@ -270,7 +270,7 @@ class SimpleAssignmentTypeInferer(object):
while ready_to_infer: while ready_to_infer:
entry = ready_to_infer.pop() entry = ready_to_infer.pop()
types = [expr.infer_type(scope) for expr in entry.assignments] types = [expr.infer_type(scope) for expr in entry.assignments]
if Utils.all(types): if types and Utils.all(types):
entry.type = spanning_type(types, entry.might_overflow) entry.type = spanning_type(types, entry.might_overflow)
else: else:
# FIXME: raise a warning? # FIXME: raise a warning?
......
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