File tree 2 files changed +33
-0
lines changed
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
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()
Original file line number Diff line number Diff line change
1
+ import scala .annotation .unchecked .uncheckedVariance
2
+
3
+ trait SubFlowDef [+ F [+ _]]
4
+ final class Flow1 [- In ]{
5
+ type Repr [+ O ] = Flow1 [In @ uncheckedVariance]
6
+ }
7
+ final class Flow2 [+ Out ]{
8
+ type Repr [+ O ] = Flow2 [O ]
9
+ }
10
+ class SubFlow [In , Out ](
11
+ val delegate1 : SubFlowDef [Flow1 [In ]# Repr ],
12
+ val delegate2 : SubFlowDef [Flow2 [Out ]# Repr ]
13
+ )
14
+
15
+ object Test {
16
+ def main (args : Array [String ]): Unit = {
17
+ classOf [SubFlow [? , ? ]]
18
+ .getConstructors()
19
+ .map(_.toGenericString())
20
+ .sorted
21
+ .foreach(println)
22
+
23
+ classOf [SubFlow [? , ? ]]
24
+ .getMethods()
25
+ .filter(_.getName().startsWith(" delegate" ))
26
+ .map(_.toGenericString())
27
+ .sorted
28
+ .foreach(println)
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments