Commit 6cc0fd71 authored by Xavier Thompson's avatar Xavier Thompson

Fix analysis of explicit cypclass lock arguments

parent 1a1430c1
......@@ -599,7 +599,7 @@ class CypclassLockTransform(Visitor.EnvTransform):
if not node.obj.type.is_cyp_class:
error(node.obj.pos, "Locking non-cypclass reference")
return node
if not obj_ref_id.is_local or obj_ref_id.is_arg:
if not (obj_ref_id.is_local or obj_ref_id.is_arg or obj_ref_id.is_self_arg):
error(node.obj.pos, "Can only lock local variables or arguments")
return node
with self.stacklock(obj_ref_id, node.state):
......
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