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

Multiple assignments are not working like in Go #1052

Closed
tkaehn opened this issue Mar 12, 2021 · 1 comment · Fixed by #1054
Closed

Multiple assignments are not working like in Go #1052

tkaehn opened this issue Mar 12, 2021 · 1 comment · Fixed by #1054
Assignees
Labels
area/core bug Something isn't working
Milestone

Comments

@tkaehn
Copy link

tkaehn commented Mar 12, 2021

The following program fibs.go doesn't run the same way like in Go:

package main

import "fmt"

func main() {
	a, b := 1, 1
	for i := 0; i < 10; i++ {
		fmt.Println(a)
		a, b = b, a+b
	}
}

Expected result:

$ go run fibs.go 
1
1
2
3
5
8
13
21
34
55

Got:

$ yaegi fibs.go 
1
2
4
8
16
32
64
128
256
512
@mvertes mvertes added area/core bug Something isn't working labels Mar 17, 2021
@mvertes mvertes added this to the v0.9.x milestone Mar 17, 2021
@mvertes mvertes self-assigned this Mar 17, 2021
@tkaehn
Copy link
Author

tkaehn commented Mar 27, 2021

Thanks for fixing the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants