Skip to content

Request message with 2 parameters doesn't compile with ctx.ask (Scala 2.13) #26514

Closed
@patriknw

Description

The following doesn't compile with Scala 2.13.0-M5 (works with 2.12.8) in ClusterShardingSpec:

      Behaviors.setup[TheReply] { ctx =>
	        ctx.ask(aliceRef)(WhoAreYou2(17, _)) {
	          case Success(name) => TheReply(name)
	          case Failure(ex)   => TheReply(ex.getMessage)
	        }
	
	        Behaviors.empty
	      }
[error] /home/travis/build/akka/akka/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/scaladsl/ClusterShardingSpec.scala:358:42: missing parameter type for expanded function ((x$6: <error>) => WhoAreYou2(17, x$6))
[error]         ctx.ask(aliceRef)(WhoAreYou2(17, _)) {
[error]                                          ^
[error] /home/travis/build/akka/akka/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/scaladsl/ClusterShardingSpec.scala:359:42: type mismatch;
[error]  found   : Any
[error]  required: String
[error]           case Success(name) => TheReply(name)
[error]     

Metadata

Assignees

No one assigned

    Labels

    1 - triagedTickets that are safe to pick up for contributing in terms of likeliness of being acceptedt:typed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions