Skip to content
Merged
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: 1 addition & 5 deletions Sources/TestingMacros/TestDeclarationMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,7 @@ public struct TestDeclarationMacro: PeerMacro, Sendable {
}

// Generate a thunk function that invokes the actual function.
// NOTE: `thunkBody` is not actually an expression. It's better-represented
// as an instance of CodeBlockItemListSyntax, but due to its size it is
// easier to express using string interpolation than by directly creating an
// instance of CodeBlockItemListSyntax.
var thunkBody: ExprSyntax
var thunkBody: CodeBlockItemListSyntax
if functionDecl.availability(when: .unavailable).first != nil {
thunkBody = ""
} else if let typeName {
Expand Down