Skip to content
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

cmd/compile: map literals should pass static size to constructor #16279

Closed
randall77 opened this issue Jul 6, 2016 · 0 comments
Closed

cmd/compile: map literals should pass static size to constructor #16279

randall77 opened this issue Jul 6, 2016 · 0 comments

Comments

@randall77
Copy link
Contributor

func f(x, y, z int) map[int]int {
    return map[int]int{x: y, y: z, z: x}
}

This code calls runtime.makemap with 0 as the size hint. It should pass 3 as the size hint.

See #15880 for a similar issue about static maps.

@randall77 randall77 added this to the Go1.8 milestone Jul 6, 2016
@randall77 randall77 self-assigned this Jul 6, 2016
@golang golang locked and limited conversation to collaborators Aug 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants