Skip to content

Commit 1b9d12c

Browse files
committed
Add regresion test for #21576
1 parent 4e27694 commit 1b9d12c

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

Diff for: tests/run/i21576.check

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public SubFlow(SubFlowDef<Flow1<In>>,SubFlowDef<Flow2<java.lang.Object>>)
2+
public SubFlowDef<Flow1<In>> SubFlow.delegate1()
3+
public SubFlowDef<Flow2<java.lang.Object>> SubFlow.delegate2()

Diff for: tests/run/i21576.scala

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// scalajs: --skip
2+
import scala.annotation.unchecked.uncheckedVariance
3+
4+
trait SubFlowDef[+F[+_]]
5+
final class Flow1[-In]{
6+
type Repr[+O] = Flow1[In @uncheckedVariance]
7+
}
8+
final class Flow2[+Out]{
9+
type Repr[+O] = Flow2[O]
10+
}
11+
class SubFlow[In, Out](
12+
val delegate1: SubFlowDef[Flow1[In]#Repr],
13+
val delegate2: SubFlowDef[Flow2[Out]#Repr]
14+
)
15+
16+
object Test {
17+
def main(args: Array[String]): Unit = {
18+
classOf[SubFlow[?, ?]]
19+
.getConstructors()
20+
.map(_.toGenericString())
21+
.sorted
22+
.foreach(println)
23+
24+
classOf[SubFlow[?, ?]]
25+
.getMethods()
26+
.filter(_.getName().startsWith("delegate"))
27+
.map(_.toGenericString())
28+
.sorted
29+
.foreach(println)
30+
}
31+
}

0 commit comments

Comments
 (0)