Skip to content

Commit 1a0bcb2

Browse files
authored
Merge pull request #72564 from Mayank-84/refactor/SIL/Effects
[Minor][SIL] Refactor `matches` function in `Effects`
2 parents 346f98a + 3093925 commit 1a0bcb2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

SwiftCompilerSources/Sources/SIL/Effects.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,7 @@ public struct EscapeEffects : CustomStringConvertible, NoReflectionChildren {
350350
}
351351

352352
public func matches(_ rhsArgIdx: Int, _ rhsPath: SmallProjectionPath) -> Bool {
353-
if argumentIndex != rhsArgIdx {
354-
return false
355-
}
356-
return rhsPath.matches(pattern: pathPattern)
353+
return argumentIndex == rhsArgIdx && rhsPath.matches(pattern: pathPattern)
357354
}
358355

359356
public var bodyDescription: String {

0 commit comments

Comments
 (0)