Check the scope as well as the label name, for academic correctness' sake.

This commit is contained in:
Sei Lisa 2016-05-08 04:14:32 +02:00
parent 91ad438bb7
commit 28a8f0757c

View file

@ -1708,7 +1708,8 @@ list lazy_list_set(list L, integer i, list v)
# If so, remove the label and don't generate the jump. # If so, remove the label and don't generate the jump.
for i in xrange(len(blk)): for i in xrange(len(blk)):
node = blk[i] node = blk[i]
if node['nt'] == '@' and node['name'] == switchcasedefault: if (node['nt'] == '@' and node['name'] == switchcasedefault
and node['scope'] == blkscope):
switchcasedefault = None switchcasedefault = None
del blk[i] del blk[i]
break break