Skip to content

Commit 686ef29

Browse files
committed
Concurrency: Avoid string interpolation in argument to fatalError().
In Embedded Swift, the `String` type is unavailable. This means that the overload of `fatalError()` that takes a `String` is also unavailable. Specify a `StaticString` in the setter for `TaskLocal.projectedValue` to satisfy this constraint.
1 parent ea56972 commit 686ef29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/Concurrency/TaskLocal.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
311311

312312
@available(*, unavailable, message: "use '$myTaskLocal.withValue(_:do:)' instead")
313313
set {
314-
fatalError("Illegal attempt to set a \(Self.self) value, use `withValue(...) { ... }` instead.")
314+
fatalError("Illegal attempt to set a TaskLocal value, use `withValue(...) { ... }` instead.")
315315
}
316316
}
317317

0 commit comments

Comments
 (0)