     assert(isCocoaDictionary(d))
 
     deleted = d.removeValue(forKey: TestObjCKeyTy(10))
-    assert(deleted!.value == 1010)
+    assert((deleted as! TestObjCValueTy).value == 1010)
     var identity2 = unsafeBitCast(d, to: Int.self)
     assert(identity1 != identity2)
     assert(isNativeDictionary(d))
     assert(d.count == 2)
 
     assert(d[TestObjCKeyTy(10)] == nil)
-    assert(d[TestObjCKeyTy(20)]!.value == 1020)
-    assert(d[TestObjCKeyTy(30)]!.value == 1030)
+    assert((d[TestObjCKeyTy(20)] as! TestObjCValueTy).value == 1020)
+    assert((d[TestObjCKeyTy(30)] as! TestObjCValueTy).value == 1030)
     assert(identity2 == unsafeBitCast(d, to: Int.self))
   }
 

    assert(isCocoaDictionary(d))
    let originalCapacity = d.count
    assert(d.count == 3)
    assert(d[TestObjCKeyTy(10)]!.value == 1010)

    d.removeAll(keepingCapacity: true)
    assert(identity1 != unsafeBitCast(d, to: Int.self))

    assert(isNativeDictionary(d))
    assert(d.count == 4)

    assert((d[TestObjCKeyTy(10)] as! TestObjCValueTy).value == 1010)
    assert((d[TestObjCKeyTy(20)] as! TestObjCValueTy).value == 1020)
    assert((d[TestObjCKeyTy(30)] as! TestObjCValueTy).value == 1030)
    assert((d[TestObjCKeyTy(40)] as! TestObjCValueTy).value == 2040)
  }

  // Overwrite a value in existing binding.
