Skip to content

Resolve Warnings: Update Deprecated APIs and Remove Redundant Modifiers #2157

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 2 commits into from
Sep 6, 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
6 changes: 3 additions & 3 deletions Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public extension DeclGroupSyntax {

public extension FreestandingMacroExpansionSyntax {
@available(*, deprecated, renamed: "pound")
public var poundToken: TokenSyntax {
var poundToken: TokenSyntax {
get {
return pound
}
Expand All @@ -62,7 +62,7 @@ public extension FreestandingMacroExpansionSyntax {
}

@available(*, deprecated, renamed: "macroName")
public var macro: TokenSyntax {
var macro: TokenSyntax {
get {
return macroName
}
Expand All @@ -82,7 +82,7 @@ public extension FreestandingMacroExpansionSyntax {
}

@available(*, deprecated, renamed: "arguments")
public var argumentList: LabeledExprListSyntax {
var argumentList: LabeledExprListSyntax {
get {
return arguments
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ final class ExpressionMacroTests: XCTestCase {
of node: some FreestandingMacroExpansionSyntax,
in context: some MacroExpansionContext
) throws -> ExprSyntax {
guard let argument = node.argumentList.first?.expression else {
guard let argument = node.arguments.first?.expression else {
fatalError("Must receive an argument")
}
guard var node = argument.as(InfixOperatorExprSyntax.self) else {
Expand All @@ -265,7 +265,7 @@ final class ExpressionMacroTests: XCTestCase {
of node: some FreestandingMacroExpansionSyntax,
in context: some MacroExpansionContext
) throws -> ExprSyntax {
guard let argument = node.argumentList.first?.expression else {
guard let argument = node.arguments.first?.expression else {
fatalError("Must receive an argument")
}
context.addDiagnostics(from: MyError(), node: argument)
Expand Down