Commit 2d919f58 authored by gsamain's avatar gsamain

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

parent 18a182e9
......@@ -8214,8 +8214,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