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: type checking failed in test mode #40998

Closed
changkun opened this issue Aug 24, 2020 · 2 comments
Closed

cmd/go2go: type checking failed in test mode #40998

changkun opened this issue Aug 24, 2020 · 2 comments

Comments

@changkun
Copy link
Contributor

@changkun changkun commented Aug 24, 2020

Example 1:

// a.go2
package p

type S [type T] struct {}

// errors_test.go2
package p

import "testing"

func TestFoo(t *testing.T) {}
$ go tool go2go test
type checking failed for p
errors_test.go2:1:1: inconsistent use of () or [] for type parameters

Workaround: Rename the test file name from errors_test.go2 to a_test.go2 will get a PASS.

Example 2:

// a.go2
package p

// a_test.go2
package p

import "testing"
type S [type T] struct {}
func TestFoo(t *testing.T) {}
$ go tool go2go test
type checking failed for p
a_test.go2:1:1: inconsistent use of () or [] for type parameters

Workaround: Delete a.go2 will get a PASS.

@fzipp
Copy link
Contributor

@fzipp fzipp commented Aug 24, 2020

Duplicate of #40806

@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Aug 24, 2020

This seems to have reported in #40806. I'm going to close this issue. Please let me know if you think this was closed in error.

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
3 participants
You can’t perform that action at this time.