Skip to content

Commit eef2340

Browse files
authored
Work around a compiler crash building Attachment.record(). (#1033)
This PR works around a compiler crash that appeared in CI while building one of the overloads of `Attachment.record()`. Works around rdar://147543560. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent 588807a commit eef2340

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Testing/Attachments/Attachment.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ extension Attachment where AttachableValue: Sendable & Copyable {
265265
/// An attachment can only be attached once.
266266
@_documentation(visibility: private)
267267
public static func record(_ attachableValue: consuming AttachableValue, named preferredName: String? = nil, sourceLocation: SourceLocation = #_sourceLocation) {
268-
record(Self(attachableValue, named: preferredName), sourceLocation: sourceLocation)
268+
record(Self(attachableValue, named: preferredName, sourceLocation: sourceLocation), sourceLocation: sourceLocation)
269269
}
270270
}
271271
#endif
@@ -326,7 +326,7 @@ extension Attachment where AttachableValue: ~Copyable {
326326
///
327327
/// An attachment can only be attached once.
328328
public static func record(_ attachableValue: consuming AttachableValue, named preferredName: String? = nil, sourceLocation: SourceLocation = #_sourceLocation) {
329-
record(Self(attachableValue, named: preferredName), sourceLocation: sourceLocation)
329+
record(Self(attachableValue, named: preferredName, sourceLocation: sourceLocation), sourceLocation: sourceLocation)
330330
}
331331
}
332332

0 commit comments

Comments
 (0)