Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3270,7 +3270,7 @@ function lowerFunctionToValue(
return {
kind: 'FunctionExpression',
name,
expr: expr.node,
type: expr.node.type,
loc: exprLoc,
loweredFunc,
};
Expand Down
8 changes: 4 additions & 4 deletions compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1076,10 +1076,10 @@ export type FunctionExpression = {
kind: 'FunctionExpression';
name: string | null;
loweredFunc: LoweredFunction;
expr:
| t.ArrowFunctionExpression
| t.FunctionExpression
| t.FunctionDeclaration;
type:
| 'ArrowFunctionExpression'
| 'FunctionExpression'
| 'FunctionDeclaration';
loc: SourceLocation;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,7 @@ function codegenInstructionValue(
),
reactiveFunction,
).unwrap();
if (instrValue.expr.type === 'ArrowFunctionExpression') {
if (instrValue.type === 'ArrowFunctionExpression') {
let body: t.BlockStatement | t.Expression = fn.body;
if (body.body.length === 1 && loweredFunc.directives.length == 0) {
const stmt = body.body[0]!;
Expand Down