Unexpected (and confusing) compiler diagnostic
Swift Forums
Unexpected (and confusing) compiler diagnostic
I thought the following should work but it doesn't. I can't really see why not, what am I missing? Also, where did the UInt8 come from? Cheers, xcrun swift repl Welcome to Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101). Type :help for assistance. 1> import Foundation 2> func f<C: ContiguousBytes>(data: C) { data.withUnsafeBytes { print($0.baseAddress) } } 3> var a = [Int]() a: [Int] = 0 values 4> f(data: a) ˄˜˜˜˜˜˜˜˜˜ ╰─ error: failed to produce diagnosti...
I thought the following should work but it doesn't. I can't really see why not, what am I missing? Also, where did the UInt8 come from? Cheers, xcrun swift repl Welcome to Apple…
0 comments
No comments yet.