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
If I have a heterogeneous map m = {1: "one", 1u: "two", 1.0: "three"} then what should be the result of m[1], m[1u], and m[1.0]? The spec and conformance tests seem to be silent on this—and somewhat to my surprise—the Go implementation seems to treat heterogeneous comparisons as a fallback such that indexing by the different types yields different values.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
If I have a heterogeneous map
m = {1: "one", 1u: "two", 1.0: "three"}then what should be the result ofm[1],m[1u], andm[1.0]? The spec and conformance tests seem to be silent on this—and somewhat to my surprise—the Go implementation seems to treat heterogeneous comparisons as a fallback such that indexing by the different types yields different values.Beta Was this translation helpful? Give feedback.
All reactions