You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
Actual behavior A clear and concise description of what the bug is.
When the return of an interface includes another interface that uses one of the available type parameter the parsing fails with:
❯ mockgen -source=foo.go
2022/07/21 01:01:20 Loading input failed: foo.go:5:6: failed parsing returns: don't know how to parse type *ast.IndexExpr
This seems similar to #643, but that issue was using reflect mode.
Expected behavior A clear and concise description of what you expected to
happen.
The mock should be generated like any other generic interface, keeping the return type exactly as defined.
To Reproduce Steps to reproduce the behavior
Minimal reproduction
Save this file:
package bugTest
type (
Foo[Tany] interface {
Bar() Bar[T]
}
Bar[Tany] interface {
Baz() T
}
)
Run mockgen -source <path to file>
Additional Information
gomock mode (reflect or source): source
gomock version or git ref: v1.6.0
golang version: go version go1.19rc2 linux/amd64
Triage Notes for the Maintainers
The text was updated successfully, but these errors were encountered:
Actual behavior A clear and concise description of what the bug is.
When the return of an interface includes another interface that uses one of the available type parameter the parsing fails with:
This seems similar to #643, but that issue was using reflect mode.
Expected behavior A clear and concise description of what you expected to
happen.
The mock should be generated like any other generic interface, keeping the return type exactly as defined.
To Reproduce Steps to reproduce the behavior
Minimal reproduction
Save this file:
Run
mockgen -source <path to file>
Additional Information
Triage Notes for the Maintainers
The text was updated successfully, but these errors were encountered: