The library for web and native user interfaces.
Mirrored from https://github.com/247TaxiDriver/QOS-React.git
Synced Nov 13, 17:00 UTC
Fixtures demonstrating incorrect block scoping due to MergeConsecutiveBlocks
Fixtures from T173102122 and T173101739 demonstrating cases where MergeConsecutiveBlocks can move code out of its correct block scope, changing behavior or breaking the program, in cases where a control flow structure (such as switch) only has one non-returning control flow path. In these cases, the non-returning path gets merged with the fallthrough, effectively lifting that code out of the control flow structure and moving it into the outer scope. This can create dead code or just invalid code (with references to variables that are not in scope). Sprout fails on both of these fixtures: <img width="812" alt="Screenshot 2024-01-23 at 11 25 36 AM" src="https://github.com/facebook/react-forget/assets/6425824/d397ea22-3fa3-436e-b655-09a45781274b">