compiler: support for byte arrays as keys in maps

This commit is contained in:
Konstantin Yegupov
2019-01-31 01:12:57 +10:00
committed by Ayke van Laethem
parent f8a1e5f449
commit 504c82a0e7
4 changed files with 25 additions and 0 deletions
+4
View File
@@ -120,6 +120,10 @@ func hashmapIsBinaryKey(keyType types.Type) bool {
}
}
return true
case *types.Array:
return hashmapIsBinaryKey(keyType.Elem())
case *types.Named:
return hashmapIsBinaryKey(keyType.Underlying())
default:
return false
}