<@U0ZFBBUBU> I think what's proposed in KEEP-87 <h...
# language-proposals
r
@groostav I think what's proposed in KEEP-87 https://github.com/Kotlin/KEEP/pull/87 is a solution to this issue. The problem you describe is not fixed to
Serializable
but to any other undesirable upper bound such as
Any
in which you loose type information. With a type class
Intersect
one could constrain which instances of
A
and
B
are valid to be intersected. The compiler would bail if you try to intersect two types for which an instance is not found in the imported scope.
🤔 1