Commit 5fa9a0ba authored by Xavier Thompson's avatar Xavier Thompson

Defer locking 'locked' self at method call

parent 3c2d60a1
......@@ -429,7 +429,7 @@ class CypclassLockTransform(Visitor.EnvTransform):
old_writing = self.writing
self.writing = locally_writing
if field_access or method_call:
if field_access or (method_call and not nodetype.self_qualifier == 'locked'):
node.obj = ExprNodes.CoerceToLockedNode(node.obj, exclusive=self.writing)
self.writing = old_writing
elif objtype.is_cyp_class:
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