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

Problem when using eventually #153

Open
huntc opened this issue Mar 1, 2018 · 0 comments
Open

Problem when using eventually #153

huntc opened this issue Mar 1, 2018 · 0 comments

Comments

@huntc
Copy link

huntc commented Mar 1, 2018

The following code yields an issue given the use of eventually:

eventually {
  sender ! Udp.Send(data1, address)
  receiver.expectMsgPF() {
    case UdpListener.ReceivedWithReplyTo(Udp.Received(`data1`, _), `listener`) =>
  }
  true
}

The problem reported:

[error] scala.reflect.internal.FatalError: unexpected tree in pattern mode: class scala.reflect.internal.Trees$Block
[error] {
[error]   val $temp$macro$9 = `data1`;
[error]   $log$macro$1(utest.TestValue("`data1`", "akka.util.ByteString", $temp$macro$9));
[error]   $temp$macro$9
[error] }
[error]     at scala.reflect.internal.Reporting.abort(Reporting.scala:61)
[error]     at scala.reflect.internal.Reporting.abort$(Reporting.scala:57)

As @dwijnand suggests:

"probably this code path needs to be a little more selective about what trees it transforms into blocks, it's matching the identifier "data" in the pattern match, that cannot be a block. https://github.com/lihaoyi/utest/blob/v0.6.3/utest/shared/src/main/scala/utest/asserts/Tracer.scala#L34-L65"

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

1 participant