-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: 1.7.0, 1.10.6
-
Component/s: AsyncWriter
-
None
-
Environment:OS: Ubuntu 20.04
node.js / npm versions: 10.19.0
Additional info:
-
Developer Tools
-
Not Needed
-
Iteration Juravenator
Problem Statement/Rationale
The break under the switch statement in mongosh does not work, resulting in all statements after the matched case being executed
Please be sure to attach relevant logs with any sensitive data redacted.
How to retrieve logs for: Compass; Shell
Steps to Reproduce
run the following js in mongosh and watch result:
b = 'lt'
switch (b) { casecase : print('gt'); break; case 'lt': print('lt'); break; case 'le': print('le'); break;}
b = 'gt'
switch (b) { case 'gt': print('gt'); break; case 'lt': print('lt'); break; case 'le': print('le'); break;}
b = 'le'
switch (b) { case 'gt': print('gt'); break; case 'lt': print('lt'); break; case 'le': print('le'); break;}
Expected Results
The three switch statements should print 'lt', 'gt', and 'le' respectively
Actual Results
the first switch statement print:
lt
le
the 2nd switch statement print:
gt
lt
le
the 3rd print:
le
Additional Notes
Any additional information that may be useful to include.