Skip to content

Fix deprecation warnings #2007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Tests/SwiftSyntaxTest/AbsolutePositionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public class AbsolutePositionTests: XCTestCase {
public func testSourceLocation() {
let filePath = "/tmp/test.swift"
let root = self.createSourceFile(2)
let converter = SourceLocationConverter(file: filePath, tree: root)
let converter = SourceLocationConverter(fileName: filePath, tree: root)
let secondReturnStmt = root.statements[1]
let startLoc = secondReturnStmt.startLocation(converter: converter)
XCTAssertEqual(startLoc.line, 8)
Expand Down
4 changes: 2 additions & 2 deletions Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fileprivate func assertPresumedSourceLocation(
file: StaticString = #file,
line: UInt = #line
) {
let converter = SourceLocationConverter(file: "input.swift", tree: source)
let converter = SourceLocationConverter(fileName: "input.swift", tree: source)

guard let variableDecl = source.statements.compactMap({ inspectionItemFilter($0.item) }).first else {
XCTFail("Could not find a node that matches the `inspectionItemFilter` in `source`", file: file, line: line)
Expand Down Expand Up @@ -62,7 +62,7 @@ final class SourceLocationConverterTests: XCTestCase {
// ```
// assert(tree.byteSize == endOfFile.utf8Offset)
// ```
_ = SourceLocationConverter(file: "", tree: tree)
_ = SourceLocationConverter(fileName: "", tree: tree)
}

func testSingleSourceLocationDirective() {
Expand Down