Skip to content

Commit 0f37af2

Browse files
authored
Work around a compiler crash trying to demangle an expression macro inside an attached macro expansion. (#754)
We've started getting a crash expanding a test where `#_sourceLocation` is explicitly written inside the arguments array. Works around rdar://137450977. ### 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 619b4a9 commit 0f37af2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/TestingTests/EventTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ struct EventTests {
2424
differenceDescription: "Difference Description",
2525
isPassing: false,
2626
isRequired: true,
27-
sourceLocation: #_sourceLocation
27+
sourceLocation: SourceLocation(fileID: "M/f.swift", filePath: "/f.swift", line: 1, column: 1)
2828
)
2929
),
3030
Event.Kind.testSkipped(
3131
SkipInfo(
3232
comment: "Comment",
3333
sourceContext: SourceContext(
3434
backtrace: Backtrace.current(),
35-
sourceLocation: #_sourceLocation
35+
sourceLocation: SourceLocation(fileID: "M/f.swift", filePath: "/f.swift", line: 1, column: 1)
3636
)
3737
)
3838
),

0 commit comments

Comments
 (0)