WojciechMazur commented on PR #1474:
URL: https://github.com/apache/pekko/pull/1474#issuecomment-2343276003

   Here's the reproducer: 
   ```scala
   import scala.annotation.unchecked.uncheckedVariance
   
   object scaladsl{
     trait FlowOpsMat[+Out, +Mat] {
       type Repr[+O] <: ReprMat[O, Mat] {
         type Repr[+OO] = FlowOpsMat.this.Repr[OO]
         type ReprMat[+OO, +MM] = FlowOpsMat.this.ReprMat[OO, MM]
       }
       type ReprMat[+O, +M] <: FlowOpsMat[O, M] {
         type Repr[+OO] = FlowOpsMat.this.ReprMat[OO, M @uncheckedVariance]
         type ReprMat[+OO, +MM] = FlowOpsMat.this.ReprMat[OO, MM]
       }
     }
     trait FlowOps[+Out, +Mat] {
       type Repr[+O] <: FlowOps[O, Mat] {
         type Repr[+OO] = FlowOps.this.Repr[OO]
       }
     }
     trait SubFlow[+Out, +Mat, +F[+_], C] extends FlowOps[Out, Mat] {
       override type Repr[+T] = SubFlow[T, Mat @uncheckedVariance, F 
@uncheckedVariance, C @uncheckedVariance]
     }
     final class Flow[-In, +Out, +Mat] extends FlowOpsMat[Out, Mat]{
       override type Repr[+O] = Flow[In @uncheckedVariance, O, Mat 
@uncheckedVariance]
       override type ReprMat[+O, +M] = Flow[In @uncheckedVariance, O, M]
     }
     final class Sink[-In, +Mat]
   
   }
   class SubFlow[In, Out, Mat](
       delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[In, Out, Mat]#Repr, 
scaladsl.Sink[In, Mat]]) {
   
     def asScala: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[In, Out, Mat]#Repr, 
scaladsl.Sink[In, Mat]] @uncheckedVariance =
       delegate
   }
   ```
   
   Compilation with both Scala 2.13 and 3.3.4-RC2 would produce the following 
signatures: 
   ```scala
    private final scaladsl$SubFlow<Out, Mat, ?, scaladsl$Sink<In, Mat>> 
delegate;
       descriptor: Lscaladsl$SubFlow;
       Signature: #19                          // 
Lscaladsl$SubFlow<TOut;TMat;*Lscaladsl$Sink<TIn;TMat;>;>;
   
     public scaladsl$SubFlow<Out, Mat, ?, scaladsl$Sink<In, Mat>> asScala();
       descriptor: ()Lscaladsl$SubFlow;
       Signature: #22                          // 
()Lscaladsl$SubFlow<TOut;TMat;*Lscaladsl$Sink<TIn;TMat;>;>;
   ```
   
   In Scala 3.3.3 we were generating 
   ```scala
    private final scaladsl$SubFlow<Out, Mat, scaladsl$Flow<In, 
java.lang.Object, Mat>, scaladsl$Sink<In, Mat>> delegate;
       descriptor: Lscaladsl$SubFlow;
       Signature: #19                          // 
Lscaladsl$SubFlow<TOut;TMat;Lscaladsl$Flow<TIn;Ljava/lang/Object;TMat;>;Lscaladsl$Sink<TIn;TMat;>;>;
   
     public SubFlow(scaladsl$SubFlow<Out, Mat, scaladsl$Flow<In, 
java.lang.Object, Mat>, scaladsl$Sink<In, Mat>>);
       descriptor: (Lscaladsl$SubFlow;)V
       Signature: #22                          // 
(Lscaladsl$SubFlow<TOut;TMat;Lscaladsl$Flow<TIn;Ljava/lang/Object;TMat;>;Lscaladsl$Sink<TIn;TMat;>;>;)V
   ```
   
   tl;dr
   In 3.3.3 `Flow[In, Out, Repr]#Repr` was dealiased, but in Scala 2.13 and 
3.3.4-RC1/RC2 it is a wildcard param type. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to