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

Compilation error on mocking java class with varargs constructor #245

Open
NersesAM opened this issue Aug 24, 2018 · 0 comments
Open

Compilation error on mocking java class with varargs constructor #245

NersesAM opened this issue Aug 24, 2018 · 0 comments

Comments

@NersesAM
Copy link

ScalaMock Version 4.1.0

Scala Version 2.12

Runtime JVM

Please describe the expected behavior of the issue

trying to stub/mock a java class which accepts varargs in a constructor should work

Please provide a description of what actually happens

But compilation fails with the following message

[error]  found   : String*
[error]  required: String
[error]   val site         = stub[MyClass]
[error]                          ^

Reproducible Test Case

public class MyClass {
    public MyClass(String... varargs) {

    }
}
test("my failing test") {
  val s = stub[MyClass]
}
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

2 participants