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
Member

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 commented Aug 24, 2020

Duplicate of #40806

@cagedmantis
Copy link
Contributor

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.

@golang golang locked and limited conversation to collaborators Aug 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants