Skip to content

Conversation

@nicolasfara
Copy link

@nicolasfara nicolasfara commented Oct 27, 2025

Pull Request Checklist

  • I agree to licence my contributions under the MIT licence
  • I have added copyright headers to new files
  • I have added tests for any changed functionality

Fixes

This PR fixes #696

Purpose

When a method in a trait is defined as follows:

trait Foo:
  def foo[F[_], V](data: F[V]): Unit

trying to stub it:

val stubbed = stub[Foo]
stubbed.foo[List, Int].returns(_ => ())

returns the error: Method with such signature not found

This PR fixes such an error.

Background Context

I extended the algorithm, considering also the conformance to the type signature when the actual parameters are tested against the signature.

References

Fixes issue #696

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Method with such signature not found on method with HKT

1 participant