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
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,
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
ion Array : Decodable where 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