Usage of Range operator in Data.subdata
<p>In Swift 3, I wonder why I'm able to use the half-open range operator <code>..&lt;</code> in <a href="https://developer.apple.com/reference/foundation/data/1779918-subdata" rel="noreferrer">Data.subdata(in:)</a> but not the closed range operator <code>...</code>.</p>

<p>I've searched everywhere but can't understand why it gives me this error : 
<em>no '...' candidates produce the expected contextual result type
'Range' (aka 'Range')</em></p>

<p>Here's an example of both the one that works and the one doesn't :</p>

<pre><code>import Foundation

let x = Data(bytes: [0x0, 0x1])
let y : UInt8 = x.subdata(in: 0..&lt;2).withUnsafeBytes{$0.pointee}
let z : UInt8 = x.subdata(in: 0...1).withUnsafeBytes{$0.pointee} // This fails
</code></pre>

<p>Thanks!</p>