Just checking - in a when block like this: ```imp...
# getting-started
r
Just checking - in a when block like this:
Copy code
import java.time.Period

fun Period.toDays() = when (this) {
  Period.ofYears(1) -> 365
  Period.ofMonths(1) -> 30
  else -> days
}
the check is an equality check, not an identity check, isn't it? I'm getting a compiler warning
Identity-sensitive operation on an instance of value type 'Period' may cause unexpected behavior or errors.
, but surely this is an equality check...
(Ignore the obvious issues with assuming the length of years and months...)