[swift-users] swift 4.0 "swift-version 4" errors with "type(of:"

Edward Connell ewconnell at gmail.com
Fri May 19 13:18:11 CDT 2017


When running the compiler using the "-swift-version 4" flag, the compiler
complains about creating a dynamic type. Errors are flagged from within
concrete base classes and also within protocol extensions.

*error: cannot invoke 'type' with an argument list of type '(of: Self)'*
*                let newObject = type(of: self).init()*

Has this changed?? Are we supposed to create dynamic types a different way
now?

Thanks, Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170519/e26384c5/attachment.html>


More information about the swift-users mailing list