Bug #4212

distinguish 'return' in switch blocks et al.

Added by Hirundo about 7 years ago. Updated about 7 years ago.

Status:NewStart date:2012-09-12
Priority:LowDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Currently there is no difference between 'x;' and 'return x;' in a switch-block. This difference should IMO be made, but it probably can't be done instantly as there are significant amounts of 'wrong' code out there. r1993 added some preliminary code, but more work is needed. Implementation detail: ast.switch.SwitchValue should probably be moved to actions.action2var, so we can also create SwitchValues from there without circular imports.

History

#1 Updated by planetmaker about 7 years ago

Sounds like a nice mid-term goal.
What should be the intended difference of use cases between 'X' and 'return X'?

Also available in: Atom PDF