   }
 }
 
-extension _CocoaDictionary {
-  @usableFromInline
-  @_effects(releasenone)
-  internal func key(for index: Index) -> AnyObject {
-    return index.allKeys[index.currentKeyIndex]
-  }
-}
-
 extension _CocoaDictionary: Equatable {
   @usableFromInline
   internal static func ==(

      cocoaPath()
      // We have to migrate the data first.  But after we do so, the Cocoa
      // index becomes useless, so get the key first.
      let cocoaKey = cocoa.key(for: index._asCocoa)
      let native = _NativeDictionary<Key, Value>(cocoa)
      self = .native(native)
      let nativeKey = _forceBridgeFromObjectiveC(cocoaKey, Key.self)


  @inlinable
  @inline(__always)
  func key(at index: Index) -> Key {
    switch self {
    case .native:
      return asNative.key(at: index._asNative)
#if _runtime(_ObjC)
    case .cocoa(let cocoa):
      cocoaPath()
      let cocoaKey = cocoa.key(at: index._asCocoa)
      return _forceBridgeFromObjectiveC(cocoaKey, Key.self)
#endif
    }
  }

  @inlinable
  @inline(__always)
  func value(at index: Index) -> Value {
    switch self {
    case .native:
      return asNative.value(at: index._asNative)
#if _runtime(_ObjC)
    case .cocoa(let cocoa):
      cocoaPath()
      let cocoaValue = cocoa.value(at: index._asCocoa)
      return _forceBridgeFromObjectiveC(cocoaValue, Value.self)
#endif
    }
