Skip to content

cmd/go: wrong signature error when using a type alias for *testing.T #62454

Open
@ghost

Description

Seems you can't alias testing.T, it confuses go test. Confuses Go Playground too.

go version go1.18.1 linux/amd64

What did you do?

https://go.dev/play/p/21W7rITsLUb

What did you expect to see?

Test results

What did you see instead?

wrong signature for TestLastIndex, must be: func TestLastIndex(t *testing.T)

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions