<Problem with types> It’s hard to describe that pr...
# forum
r
Problem with types It’s hard to describe that problem with words, so I’ll just send an example ˋˋˋkt interface A interface B interface C class X: A, B class Y: A, B, C fun f(p: X) fun f(p: Y) ˋˋˋ The behaviour of both definitions of ˋfˋ is exactly the same. ˋfˋ should take in any type that implements A and B. but this is very bad obviously. The only solution to that problem: ˋˋˋkt interface AB: A, B class X: AB class Y: AB, C fun f(p: AB) ˋˋˋ This works perfectly fine, but you can’t always do that. If you can’t...