mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Add todo for label as value block terminal
We need to revisit the conversion from value blocks into ReactiveFunction. Or just revisit ReactiveFunction altogether (see my post about what this would look like). For now, makes this case a todo.
This commit is contained in:
1 parent
d70b2c2c4e
commit
1301e68ae6
2 files changed
+9
-1
No files matched your search
+8
@@ -1069,6 +1069,14 @@ class Driver {
|
||||
suggestions: null,
|
||||
});
|
||||
}
|
||||
case "label": {
|
||||
CompilerError.throwTodo({
|
||||
reason: `Support labeled statements combined with value blocks (conditional, logical, optional chaining, etc)`,
|
||||
description: null,
|
||||
loc: terminal.loc,
|
||||
suggestions: null,
|
||||
});
|
||||
}
|
||||
default: {
|
||||
CompilerError.invariant(false, {
|
||||
reason: `Unexpected value block terminal kind '${terminal.kind}'`,
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ function Component(props) {
|
||||
> 4 | return [props.value];
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> 5 | }) || []
|
||||
| ^^^^^^^^^^^^^ [ReactForget] Invariant: Unexpected value block terminal kind 'label' (3:5)
|
||||
| ^^^^^^^^^^^^^ [ReactForget] Todo: Support labeled statements combined with value blocks (conditional, logical, optional chaining, etc) (3:5)
|
||||
6 | );
|
||||
7 | }
|
||||
8 |
|
||||
|
||||
Reference in new issue
Block a user