cmd/go2go: use embedded comparable in maps test

Change-Id: I9f3a8a377597330daa43d1757ddd8a18560cf5d4
This commit is contained in:
Ian Lance Taylor 2020-03-12 07:55:11 -07:00 committed by Robert Griesemer
parent a30aa6c43e
commit 2902418378
1 changed files with 2 additions and 11 deletions

View File

@ -26,17 +26,8 @@ func Values(type K, V comparable(K))(m map[K]V) []V {
}
contract twocomparable(K, V) {
// Should be
// comparable(K)
// comparable(V)
K int, int8, int16, int32, int64,
uint, uint8, uint16, uint32, uint64, uintptr,
float32, float64,
string
V int, int8, int16, int32, int64,
uint, uint8, uint16, uint32, uint64, uintptr,
float32, float64,
string
comparable(K)
comparable(V)
}
// Equal reports whether two maps contain the same key/value pairs.