   var cfStr: CFString = str
   var cfMutableStr: CFMutableString = str // expected-error{{'NSString' is not a subtype of 'NSMutableString'}}
 }
+
+func testCFToAnyObject(cfStr: CFString, cfMutableStr: CFMutableString,
+                       cfTree: CFTree) {
+  var anyObject: AnyObject = cfStr
+  anyObject = cfMutableStr
+  anyObject = cfTree
+}
+
+func testAnyObjectToCF(anyObject: AnyObject) {
+  var cfStr: CFString = anyObject as CFString
+  var cfMutableStr: CFMutableString = anyObject as CFMutableString
+  var cfTree: CFTree = anyObject as CFTree
+
+  // No implicit conversions.
+  cfStr = anyObject // expected-error{{type 'AnyObject' cannot be implicitly downcast to 'CFString'; did you mean to use 'as' to force downcast?}}
+}
+

  nsStr = nsMutableStr
}

func testObjCToCF(let nsStr: NSString, nsMutableStr: NSMutableString) {
  var cfStr: CFString = nsStr
  cfStr = nsMutableStr


import CoreFoundation
import Foundation

func testCFToObjC(cfStr: CFString, cfMutableStr: CFMutableString) {
  var nsStr: NSString = cfStr
  nsStr = cfMutableStr

