Avatar
swiftbot BOT 6/1/2018 9:25 AM
Author icon
masakihori
let i: AnyObject = Int(19) let f: AnyObject = { (a: Int) -> Int in a * 2 } enum E { case none } let e: AnyObject = E.none
Version:
swift-4.1.1-RELEASE
Output:
Error:
/usercode/main.swift:1:20: error: value of type 'Int' does not conform to specified type 'AnyObject' let i: AnyObject = Int(19) ^~~~~~~ as! AnyObject /usercode/main.swift:2:20: error: value of type '(Int) -> Int' does not conform to specified type 'AnyObject' let f: AnyObject = { (a: Int) -> Int in a * 2 } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ as! AnyObject /usercode/main.swift:7:22: error: value of type 'E' does not conform to specified type 'AnyObject' let e: AnyObject = E.none ~~^~~~ as! AnyObject