This is an automated email from the ASF dual-hosted git repository.

hepin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko.git


The following commit(s) were added to refs/heads/main by this push:
     new daf84d7870 chore: Fix ActorDocSpec on Scala 3.3
daf84d7870 is described below

commit daf84d787029a5c412cf88d74a97c4b61ff43494
Author: He-Pin <[email protected]>
AuthorDate: Tue Jan 30 17:06:15 2024 +0800

    chore: Fix ActorDocSpec on Scala 3.3
---
 docs/src/test/scala/docs/actor/ActorDocSpec.scala | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/docs/src/test/scala/docs/actor/ActorDocSpec.scala 
b/docs/src/test/scala/docs/actor/ActorDocSpec.scala
index 253ef30ff3..9cc8ca705d 100644
--- a/docs/src/test/scala/docs/actor/ActorDocSpec.scala
+++ b/docs/src/test/scala/docs/actor/ActorDocSpec.scala
@@ -441,6 +441,9 @@ class ActorDocSpec extends PekkoSpec("""
     // #system-actorOf
     shutdown(system)
   }
+  private abstract class DummyActorProxy {
+    def actorRef: ActorRef
+  }
 
   "creating actor with IndirectActorProducer" in {
     class Echo(name: String) extends Actor {
@@ -454,7 +457,8 @@ class ActorDocSpec extends PekkoSpec("""
       }
     }
 
-    val a: { def actorRef: ActorRef } = new AnyRef {
+    import scala.language.existentials
+    val a: DummyActorProxy = new DummyActorProxy() {
       val applicationContext = this
 
       // #creating-indirectly
@@ -474,10 +478,8 @@ class ActorDocSpec extends PekkoSpec("""
       val actorRef = system.actorOf(Props(classOf[DependencyInjector], 
applicationContext, "hello"), "helloBean")
       // #creating-indirectly
     }
-    val actorRef = {
-      import scala.language.reflectiveCalls
-      a.actorRef
-    }
+
+    val actorRef = a.actorRef
 
     val message = 42
     implicit val self = testActor


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to