Commit 95629148 authored by gsamain's avatar gsamain Committed by Xavier Thompson

Avoid analysing things further in with [rw]locked statements when it's not a cyobject

parent daa3ce36
......@@ -8464,8 +8464,10 @@ class LockCypclassNode(StatNode):
self.obj.ensure_rhs_locked(env)
if not hasattr(self.obj, 'entry'):
error(self.pos, "The (un)locking target has no entry")
return
if not self.obj.type.is_cyp_class:
error(self.pos, "Cannot (un)lock a non-cypclass variable !")
return
# FIXME: this is a bit redundant here
self.obj.get_tracked_state(env)
......
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