Skip to content

Commit 6da0e6a

Browse files
baywetCopilot
andauthored
chore: applies review suggestions
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 9d48ed0 commit 6da0e6a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

csharp/ql/lib/Linq/Helpers.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ predicate missedFirstOrDefaultOpportunity(ForeachStmtGenericEnumerable fes, IfSt
225225
not is.getCondition().getAChildExpr*() instanceof AwaitExpr and
226226
not fes.isAsync() and
227227
returnsLoopVariable(fes, is.getThen()) and
228+
fes.getElementType() = fes.getVariable().getType() and
228229
returnsDefaultValueAfterForeach(fes)
229230
}
230231

0 commit comments

Comments
 (0)