cgen: fix map clone (#7366)

This commit is contained in:
Ned Palacios 2020-12-17 15:44:50 +08:00 committed by GitHub
parent 8addb31440
commit c164586fd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

View file

@ -573,7 +573,7 @@ pub fn (d &DenseArray) clone() DenseArray {
}
[unsafe]
pub fn (m map) clone() map {
pub fn (m &map) clone() map {
metasize := int(sizeof(u32) * (m.cap + 2 + m.extra_metas))
res := map{
key_bytes: m.key_bytes