https://kotlinlang.org logo
#getting-started
Title
# getting-started
r

reactormonk

07/04/2022, 8:54 PM
What's the syntax for two bounds in generics?
Copy code
fun <A: Enum<A>, Positional> EnumSet<A>.toByte(): Byte {
Apparently it's not
,
nor
:
e

ephemient

07/04/2022, 8:57 PM
Copy code
fun <A> EnumSet<A>.toByte(): Byte where A: Enum<A>, A: Positional {
https://kotlinlang.org/docs/generics.html#generic-constraints
r

reactormonk

07/04/2022, 8:59 PM
Neat, thanks!
4 Views