@samitouri / QOS-React-2 / commits / 0cb10446b3

[test] Failing test for returning from a for-loop

Sathya Gunasekaran committed Apr 1, 2023 at 09:22 UTC 0cb10446b32cf63c7a055dcff46087c65441cff5
2 files changed +25
compiler/forget/src/__tests__/fixtures/compiler/error.leave-ssa-handle-return-in-for.expect.md new
+20
@@ -0,0 +1,20 @@
1 +
2 +## Input
3 +
4 +```javascript
5 +function foo(props) {
6 + for (let i = 0; i < 10; i += 1) {
7 + return;
8 + }
9 +}
10 +
11 +```
12 +
13 +
14 +## Error
15 +
16 +```
17 +Cannot read properties of undefined (reading 'phis')
18 +```
19 +
20 +
\ No newline at end of file
compiler/forget/src/__tests__/fixtures/compiler/error.leave-ssa-handle-return-in-for.js new
+5
@@ -0,0 +1,5 @@
1 +function foo(props) {
2 + for (let i = 0; i < 10; i += 1) {
3 + return;
4 + }
5 +}