title: swift "cannot subscript a value of type" error
body: <p>I'm trying to do this: </p>
  
  <pre><code>self.prepared[$0]
  </code></pre>
  
  <p>where prepared is an instance of <code>Dictionary&lt;String, (String, Size)&gt;</code>, and $0 is a <code>String</code>.</p>
  
  <p>Any ideas anyone - I don't know why this can't be subscripted.</p>
  
  <hr>
  
  <p>(Full error is this: <code>error: cannot subscript a value of type 'inout PreparedImageResponses' (aka 'inout Dictionary&lt;String, ProductImageResponse&gt;')</code></p>
  
  <p>where PreparedImageResponses is a typealias of <code>[String: (String, Size)]</code> and ProductImageResponse is a typealias of a tuple <code>(String, Size)</code> (Size is just a struct).</p>