上溯造型

as 運算子將轉換為超型別。因為它不會失敗,它不會返回一個可選項。

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