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
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@zerbitx
Copy link

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 commented Jun 22, 2020

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

@randall77
Copy link
Contributor

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

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 22, 2020
@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

/cc @griesemer @ianlancetaylor

@gopherbot
Copy link

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

@ianlancetaylor
Copy link
Contributor

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>
@golang golang locked and limited conversation to collaborators Jun 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants