https://kotlinlang.org logo
#language-proposals
Title
# language-proposals
k

karelpeeters

03/12/2018, 3:43 PM
The compiler won't be confused, it would just be very difficult to read:
Copy code
when(obj.state) {
    .A -> ...
    .B -> ...
}

when (obj.letter) {
    .A -> ...
}
isn't that readable if
letter
and
state
have different types.