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/go2go: panics with unimplemented Spec *ast.TypeSpec #39741

Closed
zerbitx opened this issue Jun 21, 2020 · 5 comments
Closed

cmd/go2go: panics with unimplemented Spec *ast.TypeSpec #39741

zerbitx opened this issue Jun 21, 2020 · 5 comments

Comments

@zerbitx
Copy link

@zerbitx zerbitx commented Jun 21, 2020

What did you do?

Tried to run: https://go2goplay.golang.org/p/BFTD2DdjyeP

What did you expect to see?

1 : 1, 1
2 : 1, 2
3 : 2, 6
4 : 3, 24
5 : 5, 120
6 : 8, 720
7 : 13, 5040
8 : 21, 40320
9 : 34, 362880

What did you see instead?

panic: unimplemented Spec *ast.TypeSpec

Other notes

This was a first attempt at porting the non-generic version here: https://gist.github.com/wancw/4301d95cea1169631435

Also tried this alternative. It doesn't panic, but asked for an operand and I'm not sure why.

@acln0
Copy link
Contributor

@acln0 acln0 commented Jun 22, 2020

I got the same panic with this program: https://go2goplay.golang.org/p/YbigQFHT_RZ

@randall77
Copy link
Contributor

@randall77 randall77 commented Jun 22, 2020

I got this as well, from this program: https://go2goplay.golang.org/p/Q-Axa9uUaJL

@cagedmantis cagedmantis added this to the Unreleased milestone Jun 22, 2020
@cagedmantis cagedmantis changed the title cmd/go2go panic: unimplemented Spec *ast.TypeSpec cmd/go2go: panics with unimplemented Spec *ast.TypeSpec Jun 22, 2020
@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Jun 22, 2020

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 22, 2020

Change https://golang.org/cl/239297 mentions this issue: [dev.go2go] go/go2go: instantiate local type specs

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jun 22, 2020

Thanks for the test case. This should be fixed now on the dev.go2go branch.

gopherbot pushed a commit that referenced this issue Jun 22, 2020
Fixes #39741

Change-Id: I75e3b98afa5184b87d4a7bbf360761e5cc6c6217
Reviewed-on: https://go-review.googlesource.com/c/go/+/239297
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.