compiler: support make()

This commit is contained in:
Evgenii Stratonikov 2020-08-24 11:58:29 +03:00
parent d8badd9a8d
commit 0f11116040
5 changed files with 70 additions and 3 deletions

View file

@ -27,6 +27,11 @@ func isBasicTypeOfKind(typ types.Type, ks ...types.BasicKind) bool {
return false
}
func isMap(typ types.Type) bool {
_, ok := typ.Underlying().(*types.Map)
return ok
}
func isByte(typ types.Type) bool {
return isBasicTypeOfKind(typ, types.Uint8, types.Int8)
}