上溯造型

as 运算符将转换为超类型。因为它不会失败,它不会返回一个可选项。

let name = "Ringo"
let value = string as Any  // `value` is of type `Any` now