Since upgrading to Kotlin 1.4.0, I can't seem to u...
# announcements
Since upgrading to Kotlin 1.4.0, I can't seem to use String.toBoolean() anymore. I always get the deprecation warning:
toBoolean(): Boolean' is deprecated. Use Kotlin compiler 1.4 to avoid deprecation warning.
It seems like this is not a well-functioning deprecation warning. There's no easy way to select the String?.toBoolean() version instead. Even if I cast to String?, the 1.4 compiler won't let me call String?.toBoolean() explicitly. It seems like a compiler bug.
Have you cleaned the build?
@colintheshots Hello! Failed to reproduce the problem. Could you please share code example and screenshots?
I did try cleaning the build. I'll see what I can come up with.
@colintheshots Did you find a way of fix your issue? I got it on a project (but on
). I try to reproduce without luck on a sample project. Even though IntelliJ 2020.2 mark the method as deprecated, gradle compile it with success without warnings.
@dwursteisen Can it be the case that you still have 1.3.x Kotlin plugin installed in IDEA?
🤦‍♂️Totally that. Good catch.
Yeah, when I first asked, the 1.4.x Kotlin plugin wasn't even available yet to pair with the other Kotlin 1.4.x libraries.
FYI, and to give a lead to people which might have the same issue: We having the issue in our project: despite using Kotlin 1.4, because gradle is trying to start a compiler daemon with Kotlin 1.3.70 (saw by running gradle with
and checking how it is invoking the kotlin compiler daemon. So the message is super obvious when you understand that you’re compiling with Kotlin 1.3 and not with Kotlin 1.4… Now, I need to find why Gradle is picking the 1.3.70 but it’s should be a configuration issue on our side.