Unresolved reference: maxByOrNull

Hi there,

I am using Kotlin 1.4.20-M2. I want to use a maxBy function, but my compilator says the function is deprecated. The official documentation recommends using a function maxByOrNull instead. However, when I follow the documentation advice, there is an unresolved reference of the new function.

Is it because this version is somewhere middle and the old function is already deprecated, but the new one still not added? :man_shrugging:

Cheers.

1 Like

I had the inconsistency between Kotlin version in Maven and the one, which is bundled into the IDE plugin (1.4.20-M2 v 1.4-M2).