Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overloaded method with a generic list cannot be mocked #94

Closed
rozza opened this issue Feb 6, 2015 · 1 comment
Closed

Overloaded method with a generic list cannot be mocked #94

rozza opened this issue Feb 6, 2015 · 1 comment
Milestone

Comments

@rozza
Copy link

rozza commented Feb 6, 2015

Originally I thought it was #93 but its actually related to the generic list:

trait Foo {
  def overloaded(x: List[_]): String
  def overloaded[T](x: List[T], y: String): String
}

val fooMock = mock[Foo]
(fooMock.overloaded: (List[_]) => String).expects(List(1.0, 2.0)) returning "one two"

fooMock.overloaded(List(1.0, 2.0))

Returns:

Information:(119, 24) Unable to resolve overloaded method overloaded
    (fooMock.overloaded: (List[_]) => String).expects(List(1.0, 2.0)) returning "one two"
                       ^
@barkhorn
Copy link
Collaborator

not reproducible anymore with newest version of ScalaMock

@barkhorn barkhorn modified the milestones: v3.5.0, v4.0.0 Jan 22, 2017
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

No branches or pull requests

3 participants