   do {
     var kv = d[d.index(forKey: TestObjCKeyTy(10))!]
     assert(kv.0 == TestObjCKeyTy(10))
-    assert(kv.1.value == 1010)
+    assert((kv.1 as! TestObjCValueTy).value == 1010)
 
     kv = d[d.index(forKey: TestObjCKeyTy(20))!]
     assert(kv.0 == TestObjCKeyTy(20))
-    assert(kv.1.value == 1020)
+    assert((kv.1 as! TestObjCValueTy).value == 1020)
 
     kv = d[d.index(forKey: TestObjCKeyTy(30))!]
     assert(kv.0 == TestObjCKeyTy(30))
-    assert(kv.1.value == 1030)
+    assert((kv.1 as! TestObjCValueTy).value == 1030)
   }
 
   // Try to find a key that does not exist.

    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(isCocoaDictionary(d1))
    let originalCapacity = d1.count
    assert(d1.count == 3)
    assert((d1[TestObjCKeyTy(10)] as! TestObjCValueTy).value == 1010)

    var d2 = d1
    d2.removeAll(keepingCapacity: true)
