Swift 3: Expression implicitly coerced from 'UIView?' to Any

前端 未结 4 978
既然无缘
既然无缘 2020-12-05 03:47

Someone else must have received this message while (or after) converting an iOS project to Swift 3, yet when I do a Google search, I get no relevant results.

Anyway,

4条回答
  •  独厮守ぢ
    2020-12-05 04:44

    Looks like a bug in the Swift compiler:

    https://bugs.swift.org/browse/SR-2921

    Currently, I'm seeing this with Xcode 8.1 and 8.2 beta 1.

    In your case, the warning should identify the source file, but not the line - as you stated. You will have to hunt around for calls to functions with Any parameters.

    Good new is that it appears fixed in an upcoming Swift toolchain.

    I believe this is fixed in Xcode 8.3 beta 1 (but have not confirmed)

提交回复
热议问题