This expression will be resolved to Int in further releases. Please add explicit convention call

Viewed 1569

In Kotlin 1.5.20 I'm getting this warning: "This expression will be resolved to Int in further releases. Please add explicit convention call" Pardon my French, but WTH does that mean?

Here is an example that gives the warning:

   assertThat(rr.maxRuntimeSeconds).isEqualTo(60*60*24*2)

The warning is caused by the isEqualTo which takes an Any

1 Answers

As per Noah comment it's about auto conversion but won't do that in future versions without an explicit conversion.

This is OK:

assertThat(rr.maxRuntimeSeconds.toInt()).isEqualTo(60*60*24*2)
Related