Commit 3e91a7bc authored by Stefan Behnel's avatar Stefan Behnel

disable type inference for closure variables as it currently breaks the...

disable type inference for closure variables as it currently breaks the closure class attribute setup
parent 9a6bcfc1
...@@ -1403,6 +1403,8 @@ class CClassScope(ClassScope): ...@@ -1403,6 +1403,8 @@ class CClassScope(ClassScope):
def declare_var(self, name, type, pos, def declare_var(self, name, type, pos,
cname = None, visibility = 'private', is_cdef = 0): cname = None, visibility = 'private', is_cdef = 0):
if type is unspecified_type:
type = py_object_type
if is_cdef: if is_cdef:
# Add an entry for an attribute. # Add an entry for an attribute.
if self.defined: if self.defined:
...@@ -1440,8 +1442,6 @@ class CClassScope(ClassScope): ...@@ -1440,8 +1442,6 @@ class CClassScope(ClassScope):
"Non-generic Python attribute cannot be exposed for writing from Python") "Non-generic Python attribute cannot be exposed for writing from Python")
return entry return entry
else: else:
if type is unspecified_type:
type = py_object_type
# Add an entry for a class attribute. # Add an entry for a class attribute.
entry = Scope.declare_var(self, name, type, pos, entry = Scope.declare_var(self, name, type, pos,
cname, visibility, is_cdef) cname, visibility, is_cdef)
......
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