Bug #4212

distinguish 'return' in switch blocks et al.

Added by Hirundo almost 8 years ago. Updated almost 8 years ago.

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


Target version:-


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.


#1 Updated by planetmaker almost 8 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