Skip to content
Closed
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
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53030,7 +53030,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
let current: Node = node;
while (current) {
if (isFunctionLikeOrClassStaticBlockDeclaration(current)) {
return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary);
return grammarErrorOnNode(node, Diagnostics.Jump_target_0_cannot_cross_function_boundary, node.label ? node.label.text : "");
}

switch (current.kind) {
Expand Down
4 changes: 4 additions & 0 deletions src/compiler/diagnosticMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@
"category": "Error",
"code": 1107
},
"Jump target '{0}' cannot cross function boundary.": {
"category": "Error",
"code": 1107
},
"A 'return' statement can only be used within a function body.": {
"category": "Error",
"code": 1108
Expand Down