akka/akka-core

Scala 3 type inference issue with ActorSystemSetups#get

開放

#29,990 建立於 2021年2月1日

 (0 則留言) (0 個反應) (0 位負責人)Scala (3,547 個分叉)batch import
1 - triagedhelp wantedt:coret:scala-3

倉庫指標

星標
 (13,277 顆星)
PR 合併指標
 (平均合併 8天 19小時) (30 天內合併 10 個 PR)

描述

Investigate and see if it surfaces in user code or just some curiosity in the tests/interaction with Scalatest.

Needing that extra type ascription is curious, but only about some weirdness with Scalatest === in Scala 3 right?

(The signature of get is ActorSystemSetups#get[T <: Setup: ClassTag]: Option[T] and we explicitly give it the T, so get here returns Option[DummySetup] and setup is DummySetup so Some(setup) should be Some[DummySetup] which extends Option[DummySetup])

Originally posted by @johanandren in https://github.com/akka/akka/pull/29956#discussion_r565905744

貢獻者指南