Any suggestion on how to troubleshoot this?
If you are planning on changing that digit or using it more than once, I would recommend making it a val or var. And the .toInt is available.
fun main() { var number = "1" val printThis = number.toInt() println(printThis)
}
This could be an IntelliJ issue. Does the program compile with Gradle?
Assuming the former, try re-installing and/or updating the Kotlin plugin for IntelliJ. Also, try clearing caches via File > Invalidate Caches ... > Invalidate and Restart
File > Invalidate Caches ... > Invalidate and Restart
If you are planning on changing that digit or using it more than once, I would recommend making it a val or var. And the .toInt is available.
}