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

Invalid behaviour in assignments with maps on the left side #534

Open
zapateo opened this issue Jan 9, 2020 · 0 comments
Open

Invalid behaviour in assignments with maps on the left side #534

zapateo opened this issue Jan 9, 2020 · 0 comments
Labels
bug Bug: something already implemented does not work as it should InvalidBehavior A valid or not valid code has an invalid behavior at runtime needsInvestigation Need to investigate

Comments

@zapateo
Copy link
Member

zapateo commented Jan 9, 2020

package main

import "fmt"

func main() {
	m := map[int]int{0: 1}
	i := 0
	i, m[i] = 1, 2
	fmt.Println(m)
}

should print

map[0:2]

but prints

map[0:1 1:2]

Note: this issue may be related to #892.

@zapateo zapateo added bug Bug: something already implemented does not work as it should needsInvestigation Need to investigate InvalidBehavior A valid or not valid code has an invalid behavior at runtime labels Jan 9, 2020
@gazerro gazerro added this to the Public Release milestone Jun 9, 2021
@gazerro gazerro removed this from the Public Release milestone Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug: something already implemented does not work as it should InvalidBehavior A valid or not valid code has an invalid behavior at runtime needsInvestigation Need to investigate
Projects
None yet
Development

No branches or pull requests

2 participants