Join Slack
Powered by
also, is there a way in this context: ```class Fo...
# announcements
d
David Glasser
12/27/2019, 6:24 PM
also, is there a way in this context:
Copy code
class Foo<T> { fun <U> function() { ... } }
to compile-time constraint
U
to be either
T
or
List<T>
(subclasses of T are OK too)?
s
StavFX
12/30/2019, 6:37 PM
afaik there’s no way to constrain a generic type with OR logic, only AND (
https://kotlinlang.org/docs/tutorials/kotlin-for-py/generics.html#constraints
)
2
Views
Open in Slack
Previous
Next