Files
swift-mirror/lib/Sema/CSSimplify.cpp
John McCall e3f6be8631 Permit @unchecked T? to be coerced to T as a conversion.
Originally, I didn't want this because I felt it made
unchecked-optional too non-local --- it wasn't always
obvious that an assignment might crash because it was
implicitly dropping optionality.  And that's still a
concern!  But I think that overall, if we're prepared
to accept that that danger is inherent in @unchecked T?,
this is a more consistent model: @unchecked T? means
that we don't know enough about the value to say for
certain that nil is a real possibility, so we'll let
you coerce it to the underlying type, and that coercion
just might not be dynamically safe.  No more special
cases for calls and member access (to the user; of
course, to the implementation these are still special cases
because of lookup and overload resolution).

Swift SVN r14796
2014-03-07 21:57:36 +00:00

72 KiB