https://kotlinlang.org logo
Title
n

nimtiazm

09/10/2019, 2:15 PM
what to replace ? with in kotlin when we don’t know what will type be at runtime and it’s definition isn’t gonna participate in any method signature of this interface
a

adamd

09/10/2019, 3:30 PM
have you tried
Any
?
n

nimtiazm

09/10/2019, 3:49 PM
yes it’s a recursive bound. to keep it open I use ? in java
using Any is similar to using star projection. so it doens’t work
T and U are simply input and output in one CStage and U is input in another CStage where output is unknown
actually in the interface, the method signatures utilize T, U and N only so it works out nicely
yes
It has to be this way because U (output) from first CStage replaces T (input) in second CStage
i’m using it without any problem.
if i use
CStage<T, U, N: CStage<U, *, N>>
i can’t use any other CStage for N
k

Kroppeb

09/10/2019, 8:32 PM
@Ruckus T and U aren't bound together though?
n

nimtiazm

09/11/2019, 7:44 AM
no there are no bounds for T and U
only N is recursively bound because it has to implement CStage
k

Kroppeb

09/11/2019, 8:35 AM
lol did he delete all his msgs?
r

Ruckus

09/11/2019, 3:23 PM
@Kroppeb Yes, I did. Sorry about that. I was getting frustrated with the conversation and didn't want to get any more notifications for it. I was operating under the false impression that deleting my comments would unsubscribe me from this thread. On the bright side, I have now discovered the (very large and obvious) "Unfollow thread" action.