Closed changkun closed 4 years ago
// 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.
errors_test.go2
a_test.go2
// 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.
a.go2
Duplicate of #40806
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.
Example 1:
Workaround: Rename the test file name from
errors_test.go2
toa_test.go2
will get a PASS.Example 2:
Workaround: Delete
a.go2
will get a PASS.