Skip to content

Commit 4977225

Browse files
committed
[Foundation] Work around name resolution in Swift 5.3
In 5.3, if an Objective-C method declared in a header shares the same name as an inaccessible Swift method, then the compiler considers the method to be inaccessible. As a workaround, rename the Swift method and stop emitting a symbol for it. This is not a problem on the trunk, but there is no reason to expose this symbol there, either.
1 parent 28b7bc0 commit 4977225

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

stdlib/public/Darwin/Foundation/CheckClass.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ extension NSKeyedUnarchiver {
3838
/// - Returns: 0 if the given class is safe to archive, and non-zero if it
3939
/// isn't.
4040
@objc(_swift_checkClassAndWarnForKeyedArchiving:operation:)
41-
@usableFromInline
42-
internal class func _swift_checkClassAndWarnForKeyedArchiving(
41+
internal class func __swift_checkClassAndWarnForKeyedArchiving(
4342
_ theClass: AnyClass,
4443
operation: CInt
4544
) -> CInt {

0 commit comments

Comments
 (0)