Skip to content

Commit f2e8966

Browse files
Update Source/SwiftLintBuiltInRules/Rules/Lint/VariableShadowingRule.swift
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
1 parent 3c65cfc commit f2e8966

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Source/SwiftLintBuiltInRules/Rules/Lint/VariableShadowingRule.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private extension VariableShadowingRule {
114114

115115
// Use early exit and lazy evaluation for better performance
116116
for scopeDeclarations in scope.dropLast() where
117-
scopeDeclarations.lazy.contains(where: { $0.declares(id: identifier) }) {
117+
scopeDeclarations.contains(where: { $0.declares(id: identifier) }) {
118118
return true
119119
}
120120
return false

0 commit comments

Comments
 (0)