akka/akka-core

Scala 3 type inference issue with ActorSystemSetups#get

Open

#29.990 aberto em 1 de fev. de 2021

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Scala (3.547 forks)batch import
1 - triagedhelp wantedt:coret:scala-3

Métricas do repositório

Stars
 (13.277 stars)
Métricas de merge de PR
 (Mesclagem média 17h 35m) (11 fundiu PRs em 30d)

Description

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

Guia do colaborador