首页
Python
Java
PHP
IOS
NodeJS
JavaScript
HTML5
小程序
AI
uwrapped
全部标签
swift - 为什么在传递给具有可选类型的函数参数时强制使用 nil 的 uwrapped 类型不会崩溃?
这个问题在这里已经有了答案:Swift3incorrectstringinterpolationwithimplicitlyunwrappedOptionals(1个回答)关闭5年前。我不明白为什么类型系统让我这样做?换句话说,我预计当foo被传递给函数时它会崩溃。varfoo:String!funcsomeFunction(_bar:String?){print("--\(bar)--")}someFunction(foo)=>writes"--nil--"
uwrapped
传递
section
notice
span
swift
swift3
Home
Powered By IT.CAOLU.XIN
页面耗时:0.0574s