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
Not quite the same problem (simple indexing rules are more relaxed) but similar: we don't allow mixing maps with non-map types for indexing. Maps just behave very differently than slices. Also, we don't have strong reasons (yet) that suggest that this must be permitted.
We are aware that per the generics proposal this could or even "should" work. But the generics proposal is not very specific with the rule details. For 1.18 and the spec (in the process of being written) we need to be very specific.
In short, for 1.18 we play it somewhat conservative. It's easy to relax the rules down the road, but impossible to change if we make a mistake by being overly broad. Thanks.
Reminder issue.
Currently not permitted (no structural type):
A little bit tricky to get right because we sometimes have to preserve the string type.
The text was updated successfully, but these errors were encountered: