Commit e9f40d35 authored by Xavier Thompson's avatar Xavier Thompson

Fix module-level autolocking causing compiler crash

parent 2e16a6e4
......@@ -2027,6 +2027,12 @@ class ModuleScope(Scope):
from .TypeInference import PyObjectTypeInferer
PyObjectTypeInferer().infer_types(self)
def declare_autolocked(self, node):
# Add an entry for autolocked cypclass
if not (node.type.is_cyp_class and node.type.lock_mode == "autolock"):
error(node.pos, "Trying to autolock a non (autolocked) cypclass object !")
self.autolocked_nodes.append(node)
class LocalScope(Scope):
......
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