Closed 0lejk4 closed 7 months ago
6.0.0-M1
3.3.1
JVM
Successfully created mock instance for path-dependent method
[error] | val pathDependent = stub[PathDependent] [error] | ^^^^^^^^^^^^^^^^^^^ [error] | Found: cmd.Answer [error] | Required: cmd.Answer [error] |--------------------------------------------------------------------------- [error] | Explanation (enabled by -explain) [error] |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [error] | [error] | Tree: this.mock$call$0.apply(cmd).asInstanceOf[cmd.Answer] [error] | I tried to show that [error] | cmd.Answer [error] | conforms to [error] | cmd.Answer [error] | but the comparison trace ended with false: [error] | [error] | ==> cmd.Answer <: cmd.Answer [error] | ==> cmd.type <: (cmd : T) [error] | ==> T <: (cmd : T) (left is approximated) [error] | ==> Command <: (cmd : T) in frozen constraint [error] | <== Command <: (cmd : T) in frozen constraint = false [error] | <== T <: (cmd : T) (left is approximated) = false [error] | <== cmd.type <: (cmd : T) = false [error] | ==> Any <: cmd.Answer (left is approximated) [error] | <== Any <: cmd.Answer (left is approximated) = false [error] | <== cmd.Answer <: cmd.Answer = false [error] | [error] | The tests were made under the empty constraint [error] ---------------------------------------------------------------------------
-explain
false
trait Command { type Answer } trait PathDependent { def call[T <: Command](cmd: T): cmd.Answer } val pathDependent = mock[PathDependent]
On it
Implemented in 6.0.0-M2
ScalaMock Version (e.g. 3.5.0)
6.0.0-M1
Scala Version (e.g. 2.12)
3.3.1
Runtime (JVM or JS)
JVM
Please describe the expected behavior of the issue
Successfully created mock instance for path-dependent method
Please provide a description of what actually happens
[error] | val pathDependent = stub[PathDependent] [error] | ^^^^^^^^^^^^^^^^^^^ [error] | Found: cmd.Answer [error] | Required: cmd.Answer [error] |--------------------------------------------------------------------------- [error] | Explanation (enabled by
-explain
) [error] |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [error] | [error] | Tree: this.mock$call$0.apply(cmd).asInstanceOf[cmd.Answer] [error] | I tried to show that [error] | cmd.Answer [error] | conforms to [error] | cmd.Answer [error] | but the comparison trace ended withfalse
: [error] | [error] | ==> cmd.Answer <: cmd.Answer [error] | ==> cmd.type <: (cmd : T) [error] | ==> T <: (cmd : T) (left is approximated) [error] | ==> Command <: (cmd : T) in frozen constraint [error] | <== Command <: (cmd : T) in frozen constraint = false [error] | <== T <: (cmd : T) (left is approximated) = false [error] | <== cmd.type <: (cmd : T) = false [error] | ==> Any <: cmd.Answer (left is approximated) [error] | <== Any <: cmd.Answer (left is approximated) = false [error] | <== cmd.Answer <: cmd.Answer = false [error] | [error] | The tests were made under the empty constraint [error] ---------------------------------------------------------------------------Reproducible Test Case