<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>That's worrisome. type is such a common identifier that I worry its going to break a lot of code, create some confusion and force the un-esthetic qualifying.</div><div><br>On 19 May 2017, at 21:38, Slava Pestov via swift-users <<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8">Do you have a member named ‘type’ in the current scope?<div class=""><br class=""></div><div class="">We changed the behavior of type(of:) so that it behaves like a normal declaration in the Swift module instead of a special keyword. Unfortunately this means if you have a ‘type’ already visible in scope, you have to fully qualify Swift.type(of:).</div><div class=""><br class=""></div><div class="">Slava</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 19, 2017, at 11:18 AM, Edward Connell via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">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.<br class=""><div class=""><br class=""></div><div class=""><div class=""><i class="">error: cannot invoke 'type' with an argument list of type '(of: Self)'</i></div><div class=""><i class=""> let newObject = type(of: self).init()</i></div></div><div class=""><br class=""></div><div class="">Has this changed?? Are we supposed to create dynamic types a different way now?</div><div class=""><br class=""></div><div class="">Thanks, Ed</div></div>
_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users">https://lists.swift.org/mailman/listinfo/swift-users</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-users mailing list</span><br><span><a href="mailto:swift-users@swift.org">swift-users@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-users">https://lists.swift.org/mailman/listinfo/swift-users</a></span><br></div></blockquote></body></html>