Andrew Gazelka07/10/2019, 1:07 PM
)… don’t understand the
flowOf(1, 1.0, 2, 2.0)
elizarov07/10/2019, 1:12 PM
here reads as
. The types here are comparable to any type that is
at the same time (such types don’t exist, but compiler does not check that) and extend
Marc Knaup07/10/2019, 1:24 PM
diesieben0707/10/2019, 1:25 PM
is more precise than
Comparable<Double & Int>
Marc Knaup07/10/2019, 1:42 PM
is impossible? A type cannot be both at once.
Double & Int
would make sense to me.
Comparable<Double | Int>
diesieben0707/10/2019, 1:50 PM
karelpeeters07/10/2019, 1:51 PM
I need to give sometime that is both an
for it to work. Obviously that's impossible, but the type system doesn't know that.
Marc Knaup07/10/2019, 1:59 PM
diesieben0707/10/2019, 1:59 PM
Marc Knaup07/10/2019, 2:03 PM
karelpeeters07/10/2019, 2:04 PM
does make sense,
Int & Double
Int | Double
Marc Knaup07/10/2019, 2:11 PM
but it isn't. So the initial type basically reads
this is a Number which is Comparable but you can't actually use generic elements of Comparable because the possible type arguments are disjoint up to but excluding(
may work as
karelpeeters07/10/2019, 2:12 PM
doesn't work either.
does 😒imple_smile: But yeah, that what it means.
Marc Knaup07/10/2019, 2:13 PM
Hullaballoonatic07/11/2019, 6:11 AM
syntax for type parameters instead of
elizarov07/11/2019, 6:55 AM