If statements that have return statements causing the return statement to clip into the bottom of the if-statement
Describe the bug The return statement clips into the bottom of the if statement when it is inside of the if statement.
To Reproduce Steps to reproduce the behavior:
- Create a function.
- Put a if statement in that function.
- Grab a return statement in that block. This might happen with other ending blocks, although this is not tested.
- The return statement now intersects the bottom of the if statement.
Expected behavior The return statement terminates the if statement cleanly. That being there isn't any clipping going on.
Screenshots
micro:bit version (please complete the following information): Not hardware related.
Desktop (please complete the following information):
- OS: Windows
- Browser Firefox
- Version 113.0.1 (64-bit)
Additional context This issue also affects MakeCode Arcade and likely other MakeCode editors.
I'm not entirely sure about the Issues Policy, this is my first issue for a PXT repo so please tell me if I did something wrong, I promise to have read the issues policy entirely and I think this is the right repo for this issue.
NOTE: REPLACED BY https://github.com/microsoft/pxt/issues/10013. IF THAT ISSUE IS CLOSED FOR BEING A DUPLICATE, THIS ISSUE SHALL BE RESOLVED HERE, OTHERWISE, THIS ISSUE SHALL REFLECT THE STATUS OF THAT ISSUE.
Issue Clarification: Return statement visuals are buggy in general, and don't just occur with if statements.
This is fixed in /beta.