> On Nov 6, 2017, at 5:47 AM, Dennis Weissmann
> wrote:
>
> Hey Charles,
>
> Thanks for going through this with me :)
>
> I'm not sure whether or not this is a compiler bug (that's partially why I
> posted it here), although I have the feeling that *something* is
Hey Charles,
Thanks for going through this with me :)
I'm not sure whether or not this is a compiler bug (that's partially why I
posted it here), although I have the feeling that *something* is definitely
wrong.
Funnily enough, the following code shows 3 compiler warnings which are
> On Nov 5, 2017, at 10:39 AM, Dennis Weissmann
> wrote:
>
>> You can delete the default case here, and your switch will still be
>> exhaustive
> That's exactly my problem! It is *not*.
>
> When I delete the default clause, the compiler warns that the switch is not
> You can delete the default case here, and your switch will still be exhaustive
That's exactly my problem! It is *not*.
When I delete the default clause, the compiler warns that the switch is not
exhaustive and fixits suggest to add the "missing" deprecated cases.
- Dennis
> On Nov 5, 2017,
> On Nov 5, 2017, at 9:27 AM, Dennis Weissmann
> wrote:
>
> Hi Charles,
>
> I do believe you :)
>
> The problem is that this doesn't work without a compiler warning if you
> switch over every case except for the deprecated ones because then the
> compiler warns
Hi Charles,
I do believe you :)
The problem is that this doesn't work without a compiler warning if you switch
over every case except for the deprecated ones because then the compiler warns
that "default will never be executed".
As per my first mail feel free to try this out in a playground:
> On Nov 5, 2017, at 3:14 AM, Dennis Weissmann
> wrote:
>
> Hi Charles,
>
> You are right (the `default` case would not catch the deprecated values but
> only new ones introduced in future releases), but the compiler doesn’t seem
> to know that :(
>
> But now that
Also noticed that when Xcode prompts to fill the missing case statements, it
fills it with the deprecated TouchID case statements (in an iOS 11 project).
> On 5 Nov 2017, at 5:14 PM, Dennis Weissmann via swift-users
> wrote:
>
> Hi Charles,
>
> You are right (the
Hi Charles,
You are right (the `default` case would not catch the deprecated values but
only new ones introduced in future releases), but the compiler doesn’t seem to
know that :(
But now that you say it, one approach could be to pattern match the raw values
(and, well, have a default clause,
> On Nov 4, 2017, at 9:38 AM, Dennis Weissmann via swift-users
> wrote:
>
> Hi swift-users,
>
> In a project (iOS 11 only) we use Touch ID for authentication and handle
> errors like so:
>
> private func handleLocalAuthenticationError(_ error: LAError) {
> switch
Hi swift-users,
In a project (iOS 11 only) we use Touch ID for authentication and handle errors
like so:
private func handleLocalAuthenticationError(_ error: LAError) {
switch error.code {
case .userCancel, .appCancel, .systemCancel:
// Handle cancelation
case
11 matches
Mail list logo