Skip to content

[Bug fix] Fix the bug about map.keys and map.values #1004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 17, 2019

Conversation

LiaoPeng
Copy link
Contributor

@LiaoPeng LiaoPeng commented Dec 13, 2019

  1. Fix the about map.keys and map.values and set.values.
    Because of initializing the array of keys and value with size, so using push will append data to array.

  2. Add test cases for map.keys, map.values and set.values.

2. Add test cases for map.keys and map.values

Signed-off-by: Liao.Peng <pengliao@live.cn>
Signed-off-by: Liao.Peng <pengliao@live.cn>
@dcodeIO
Copy link
Member

dcodeIO commented Dec 13, 2019

Good find, seems this broke when I removed Array.create. LGTM, just a nit.

Signed-off-by: Liao.Peng <pengliao@live.cn>
@MaxGraey
Copy link
Member

set.values has same problem: https://github.com/AssemblyScript/assemblyscript/blob/master/std/assembly/set.ts#L190. Could you fix that in this PR as well?

Signed-off-by: Liao.Peng <pengliao@live.cn>
@LiaoPeng
Copy link
Contributor Author

I'm glad to do this.

@dcodeIO dcodeIO merged commit 4e00fa3 into AssemblyScript:master Dec 17, 2019
@dcodeIO
Copy link
Member

dcodeIO commented Dec 17, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants