@@ -43992,12 +43992,9 @@ function codegenFunction(fn, { uniqueIdentifiers, fbtOperands, }) {
4399243992}
4399343993function codegenReactiveFunction(cx, fn) {
4399443994 for (const param of fn.params) {
43995- if (param.kind === 'Identifier') {
43996- cx.temp.set(param.identifier.declarationId, null);
43997- }
43998- else {
43999- cx.temp.set(param.place.identifier.declarationId, null);
44000- }
43995+ const place = param.kind === 'Identifier' ? param : param.place;
43996+ cx.temp.set(place.identifier.declarationId, null);
43997+ cx.declare(place.identifier);
4400143998 }
4400243999 const params = fn.params.map(param => convertParameter(param));
4400344000 const body = codegenBlock(cx, fn.body);
@@ -44549,7 +44546,7 @@ function codegenTerminal(cx, terminal) {
4454944546 ? codegenPlaceToExpression(cx, case_.test)
4455044547 : null;
4455144548 const block = codegenBlock(cx, case_.block);
44552- return libExports$1.switchCase(test, [block]);
44549+ return libExports$1.switchCase(test, block.body.length === 0 ? [] : [block]);
4455344550 }));
4455444551 }
4455544552 case 'throw': {
@@ -45628,6 +45625,10 @@ function compareScopeDeclaration(a, b) {
4562845625
4562945626function extractScopeDeclarationsFromDestructuring(fn) {
4563045627 const state = new State$1(fn.env);
45628+ for (const param of fn.params) {
45629+ const place = param.kind === 'Identifier' ? param : param.place;
45630+ state.declared.add(place.identifier.declarationId);
45631+ }
4563145632 visitReactiveFunction(fn, new Visitor$9(), state);
4563245633}
4563345634let State$1 = class State {
0 commit comments