Add type to DeclareLocal

This commit is contained in:
Joe Savona
2024-02-05 21:51:11 -08:00
parent 76aaf32c55
commit 292a247cc4
4 changed files with 5 additions and 0 deletions
@@ -867,6 +867,7 @@ function lowerStatement(
kind,
place,
},
type: null,
loc: id.node.loc ?? GeneratedSource,
});
}
@@ -1200,6 +1201,7 @@ function lowerStatement(
kind: InstructionKind.Catch,
place: { ...place },
},
type: null,
loc: handlerBindingPath.node.loc ?? GeneratedSource,
});
@@ -664,6 +664,7 @@ export type InstructionValue =
| {
kind: "DeclareLocal";
lvalue: LValue;
type: t.FlowType | t.TSType | null;
loc: SourceLocation;
}
| {
@@ -288,6 +288,7 @@ function declareTemporary(
place: result,
kind: InstructionKind.Let,
},
type: null,
loc: result.loc,
},
});
@@ -251,6 +251,7 @@ function rewriteInstruction(instr: Instruction, state: State): void {
instr.value = {
kind: "DeclareLocal",
lvalue: instr.value.lvalue,
type: instr.value.type,
loc: instr.value.loc,
};
}