You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: <rdar://problem/23670252> QoI: Misleading error message when assigning a value from [String : AnyObject]
This teaches SubscriptExpr diagnostics to substitute the base type of a
subscript expr through the generic argument types, resolving achetypes in
common situations to concrete types. We previously complained:
error: cannot subscript a value of type '[String : AnyObject]' with an index of type 'String'
which is completely wrong, we now produce the correct error:
error: cannot assign value of type 'AnyObject?' to type 'String?'
0 commit comments