Skip to content

Commit b344e37

Browse files
authored
Merge pull request #3060 from iCharlesHu/as-windows-fix
2 parents b65b4c7 + 4957329 commit b344e37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/Foundation/AttributedString/Conversion.swift

+4
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ internal func _loadDefaultAttributes() -> [String : Any.Type] {
287287

288288
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
289289
fileprivate func _loadScopeAttributes(forSymbol symbol: String, from path: String) -> [String : Any.Type]? {
290+
#if os(macOS)
290291
_loadedScopeCacheLock.lock()
291292
defer { _loadedScopeCacheLock.unlock() }
292293
if let cachedResult = _loadedScopeCache[symbol] {
@@ -302,6 +303,9 @@ fileprivate func _loadScopeAttributes(forSymbol symbol: String, from path: Strin
302303
let attributeTypes = _loadAttributeTypes(from: scopeType)
303304
_loadedScopeCache[symbol] = attributeTypes
304305
return attributeTypes
306+
#else
307+
return nil
308+
#endif // os(macOS)
305309
}
306310

307311
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)

0 commit comments

Comments
 (0)