Do you think if there will be any evolution proposal to address this
limitation? Or it’s an inherent tradeoff that is unlikely to be changed?
> On 19 Jul 2017, at 8:49 AM, Jordan Rose wrote:
>
>
>
>> On Jul 18, 2017, at 10:33, Vladimir.S via swift-users
I encounter this error today. "matching a protocol value in multiple
patterns is not yet supported; use separate cases instead"
Sample code:
import Foundation
protocol NameProtocol {
var name:String { get }
}
struct Cat:NameProtocol {
let name:String
}
struct Dog:NameProtocol {
Was it ever explained why the syntax is different?
--
Chris McIntyre
> On Jul 18, 2017, at 6:46 PM, Jens Persson via swift-users
> wrote:
>
> That is not true. Structs can have delegating initializers but they cannot be
> marked with `convenience` (only the
Hi Jens,
While I’m not familiar with the integer API in the standard library, structs
and enums certainly can have convenience initializers. They must delegate to
another initializer (either convenience or designated) rather than initializing
the fields of the type one by one.
Slava
> On Jul
I'd agree with that. Fortunately there are tools out there that can parse such
things and generate the constants for us already. Waiting for Xcode to
implement such common sense quality of life improvements probably won't end.
I'll file bugs in the meantime though.
Jon
> On Jul 18, 2017, at
I think this should be a feature of Xcode to automatically generate / maintain
these constants: When you add assets or create interface builder files, a
plug-in could take care of generating / updating such constants and you would
get auto-complete and type safety for free.
> On Jul 18, 2017,
On 17.07.2017 4:51, Glen Huang via swift-users wrote:
Thanks for the code sample and link, but if I’m not wrong, this pattern doesn’t allow
heterogeneous items.
Support the question. Trying to understand if we can have something like
[AnyHashable] for our custom protocol(with associated type)
Start a command line project in Xcode 9 beta 3 and copy paste this single
line of code into main.swift
let _ = UInt8.init(extendingOrTruncating: UInt64(123456))
Now look at Quick Help while placing the cursor on `init` and then on
`extendingOrTruncating`.
Note that (and how) the documentation
> Am 18.07.2017 um 00:58 schrieb Greg Parker via swift-users
> :
>
>
>> On Jul 17, 2017, at 10:01 AM, Nevin Brackett-Rozinsky via swift-users
>> wrote:
>>
>> Could / should these types be ExpressibleByStringLiteral?
>
> They should not. We are