Skip to content

Commit 4b7f892

Browse files
authored
Merge pull request swiftlang#18763 from aschwaighofer/use_jsonencoder_workaround_on_arm
2 parents fc41370 + 76b03fe commit 4b7f892

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

stdlib/public/SDK/Foundation/JSONEncoder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/// runtime when running on i386 simulator. The issue is tracked in https://bugs.swift.org/browse/SR-8276
1818
/// Making the protocol `internal` instead of `fileprivate` works around this issue.
1919
/// Once SR-8276 is fixed, this check can be removed and the protocol always be made fileprivate.
20-
#if arch(i386) && targetEnvironment(simulator)
20+
#if arch(i386) || arch(arm)
2121
internal protocol _JSONStringDictionaryEncodableMarker { }
2222
#else
2323
fileprivate protocol _JSONStringDictionaryEncodableMarker { }
@@ -32,7 +32,7 @@ extension Dictionary : _JSONStringDictionaryEncodableMarker where Key == String,
3232
/// which is needed for the implementation of the key conversion strategy exemption.
3333
///
3434
/// NOTE: Please see comment above regarding SR-8276
35-
#if arch(i386) && targetEnvironment(simulator)
35+
#if arch(i386) || arch(arm)
3636
internal protocol _JSONStringDictionaryDecodableMarker {
3737
static var elementType: Decodable.Type { get }
3838
}

test/stdlib/TestJSONEncoder.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
// REQUIRES: executable_test
1111
// REQUIRES: objc_interop
1212

13-
// SR-8276
14-
// XFAIL: CPU=armv7k
15-
1613
import Swift
1714
import Foundation
1815

0 commit comments

Comments
 (0)