[swift-users] Implicitly type conversion ?

Adel Zhang adelzhang at qq.com
Thu Aug 18 11:54:38 CDT 2016

Any other situation when implicit type casting works?  It would be better if there is a reference or link.
From: "Jens Alfke"<jens at mooseyard.com>
Date: 2016/8/19 00:27:33
To: "adelzhang"<adelzhang at qq.com>;
Cc: "swift-users"<swift-users at swift.org>;
Subject: Re: [swift-users] Implicitly type conversion ?

On Aug 18, 2016, at 12:18 PM, adelzhang via swift-users <swift-users at swift.org> wrote:

Why swift don't warn the type mismatch? I am woking on Xcode Version 7.3.1.

It’s an implicit type-cast. Any type `X` can always be implicitly converted to type `X?` (i.e. `Optional<X>`).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160819/b5ac18fe/attachment.html>

More information about the swift-users mailing list