e Element : Decodable.
> At the moment, this isn’t possible, so Array is unconditionally Codable and
> the failure happens at runtime. This will be a compile-time error in a future
> version of Swift.
>
> — Itai
>
> On 26 Oct 2017, at 9:47, Robert Nikander via swift-u
Hi,
This error makes perfect sense, but I’m surprised it's a runtime error. I
expected it at compile time. Am I doing something wrong? Is this on the type
system to-do list?
let c = JSONEncoder()
struct Foo { … }
let fs: [Foo] = [ Foo(...) ]
let data = try! c.encode(fs) // Didn’t thin
mes, use takeRetainedValue
> only once at the end.)
>
>> Le 18 juin 2017 à 9:23, Robert Nikander via swift-users
>> mailto:swift-users@swift.org>> a écrit :
>>
>> Hi,
>>
>> I’m porting some C to Swift and I need to pass a Swift instance through a
Hi,
I’m porting some C to Swift and I need to pass a Swift instance through a `void
*` (ie, UnsafeMutableRawPointer). It works, in one thread, but when a second
thread accesses the exact same pointer, it fails with memory errors like
EXC_BAD_ACCESS
The code below could be pasted into an AppDel
Hi,
In the following code, I want to test if x is a `SpecialController`. If it is,
I want to get the `currentValue` as a `SpecialValue`. How do you do this? If
not with a cast, then some other technique.
I understand the error, and that SpecialController by itself is not a simple
type to cast
Hi,
I’ve run into a problem when updating to new Swift in Xcode 8. There was some
NSData in a string like this:
“ … \(data) … “
It changed to type `Data`, and the string went from hexadecimal bytes to
writing “20 bytes”. I’m doing a quick bug fix app release now. I can’t remember
if X
Hi,
I’m thinking about creating an OS X app with dynamically loaded plugins. I hear
that it’s safest to load plugins in a separate process, so they can’t crash the
host program. I haven’t tried this yet, so I’m not sure exactly how it will
work. But it got me wondering… has there been any discu