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

lambda: support in return statement #1228

Closed
xushiwei opened this issue May 31, 2022 · 0 comments · Fixed by #1230
Closed

lambda: support in return statement #1228

xushiwei opened this issue May 31, 2022 · 0 comments · Fixed by #1230
Assignees
Labels
Milestone

Comments

@xushiwei
Copy link
Member

The following program sample.gop triggers an unexpected result

func intSeq() func() int {
	i := 0
	return => {
		i++
		return i
	}
}

Expected result

compile passed

Got

panic: compileExpr failed: unknown - *ast.LambdaExpr2

Gop Version

gop v1.1.0-alpha1-256-gf3285c6 darwin/amd64

Additional Notes

No response

@xushiwei xushiwei added the bug label May 31, 2022
@xushiwei xushiwei added this to the Go+ v1.1 milestone May 31, 2022
xushiwei added a commit to xushiwei/gop that referenced this issue May 31, 2022
xushiwei added a commit that referenced this issue May 31, 2022
visualfc added a commit to visualfc/gop that referenced this issue May 31, 2022
xushiwei added a commit that referenced this issue May 31, 2022
fix #1228, lamda support in return statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants