From ec3d36b865afa296e92e392618cf06bf2d717092 Mon Sep 17 00:00:00 2001 From: Joe Savona Date: Wed, 13 Mar 2024 22:25:18 -0700 Subject: [PATCH] Convert unhandled value block terminal to todo While i'm here, we know that there are a variety of cases that are not supported yet around combining value blocks with other syntax constructs. Since we're aware of these cases and detect them, we can make this a todo instead of an invariant. --- .../src/ReactiveScopes/BuildReactiveFunction.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/BuildReactiveFunction.ts b/compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/BuildReactiveFunction.ts index ccfd758eb5..4cadc566de 100644 --- a/compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/BuildReactiveFunction.ts +++ b/compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/BuildReactiveFunction.ts @@ -1078,8 +1078,8 @@ class Driver { }); } default: { - CompilerError.invariant(false, { - reason: `Unexpected value block terminal kind '${terminal.kind}'`, + CompilerError.throwTodo({ + reason: `Support '${terminal.kind}' as a value block terminal (conditional, logical, optional chaining, etc)`, description: null, loc: terminal.loc, suggestions: null,