 /// Ideally instances of this class would be allocated in-line in the
 /// buffers used for Array storage.
 @objc internal final class _SwiftDeferredNSArray
-  : _SwiftNativeNSArray, _NSArrayCoreType {
+  : _SwiftNativeNSArrayWithContiguousStorage {
 
   // This stored property should be stored at offset zero.  We perform atomic
   // operations on it.

    while true
  }

  //
  // NSArray implementation.
  //
  // Do not call any of these methods from the standard library!
  //

  @objc internal var count: Int {
    // Note: calling this function should not trigger bridging of array
    // elements, there is no need in that.
    if let bridgedStorage = _heapBufferBridged {
      return _HeapBuffer(bridgedStorage).value
    }

    return _nativeStorage._withVerbatimBridgedUnsafeBuffer { $0.count }
      ?? _nativeStorage._getNonVerbatimBridgedCount()
  }
}

/// Base class of the heap buffer backing arrays.  
internal class _ContiguousArrayStorageBase
  : _SwiftNativeNSArrayWithContiguousStorage {

  internal override func withUnsafeBufferOfObjects<R>(
    body: (UnsafeBufferPointer<AnyObject>)->R
  ) -> R {
    if let result = _withVerbatimBridgedUnsafeBuffer(body) {
      return result
    }
    _sanityCheckFailure(
      "Can't use a buffer of non-verbatim-bridged elements as an NSArray")
  }

  /// If the stored type is bridged verbatim, invoke `body` on an
  /// `UnsafeBufferPointer` to the elements and return the result.
  /// Otherwise, return `nil`.
