Skip to content

Commit a56a8ed

Browse files
authored
Merge pull request #1853 from ahoppen/ahoppen/5.9/sourceedit-compatibility
[5.9] Add a compatibility layer for the rename SourceEdit -> IncrementalEdit
2 parents 8a9d8d7 + a214b0b commit a56a8ed

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ public extension EditorPlaceholderDeclSyntax {
4242
)
4343
}
4444
}
45+
46+
@available(*, deprecated, renamed: "IncrementalEdit")
47+
public typealias SourceEdit = IncrementalEdit

Tests/SwiftRefactorTest/RefactorTestUtils.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ import SwiftSyntaxBuilder
1717
import XCTest
1818
import _SwiftSyntaxTestSupport
1919

20+
// Disambiguate between `SwiftRefactor.SourceEdit` and `SwiftSyntax.SourceEdit`
21+
typealias SourceEdit = SwiftRefactor.SourceEdit
22+
2023
func assertRefactor<R: EditRefactoringProvider>(
2124
_ input: R.Input,
2225
context: R.Context,

0 commit comments

Comments
 (0)