Skip to content

Commit 52dad73

Browse files
authored
Merge branch 'master' into m-lambda-to-fn
2 parents fcb8e87 + 8e290e5 commit 52dad73

File tree

41 files changed

+6350
-5923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6350
-5923
lines changed

.gitmodules

Whitespace-only changes.

src/compiler/checker.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -28769,7 +28769,14 @@ namespace ts {
2876928769
}
2877028770
case SyntaxKind.CommaToken:
2877128771
if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) {
28772-
error(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
28772+
const sf = getSourceFileOfNode(left);
28773+
const sourceText = sf.text;
28774+
const start = skipTrivia(sourceText, left.pos);
28775+
const isInDiag2657 = sf.parseDiagnostics.some(diag => {
28776+
if (diag.code !== Diagnostics.JSX_expressions_must_have_one_parent_element.code) return false;
28777+
return textSpanContainsPosition(diag, start);
28778+
});
28779+
if (!isInDiag2657) error(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
2877328780
}
2877428781
return rightType;
2877528782

0 commit comments

Comments
 (0)