mockery icon indicating copy to clipboard operation
mockery copied to clipboard

Unable to generate interface type from another interface

Open FournyP opened this issue 1 year ago • 16 comments

Description

Hi, I wanted to write some mock for my interface :

type ResponseLessUseCase[M any] interface {
	Execute(message *M) *errors.Error
}

type SendEmailVerificationUseCaseInterface ResponseLessUseCase[usermessages.SendEmailVerificationMessage]

But only the mock for ResponseLessUseCase was created, maybe I miss something ?

Mockery Version

v2.43.2

Golang Version

v1.22.3

Installation Method

  • [ ] Binary Distribution
  • [ ] Docker
  • [ ] brew
  • [x] go install
  • [ ] Other: [specify]

Steps to Reproduce

  1. Install go & mockery last versions
  2. Write a golang file that include a generic interface and another interface that is typed as your generic interface
  3. Run mockery

Expected Behavior

A mock for the interface that inherit the generic one

Actual Behavior

Only the mock of the generic interface

FournyP avatar Jun 10 '24 18:06 FournyP