Filipe Duarte

12/23/2021, 5:58 PM
I updated kotlin and IntelliJ, and when I tried to execute a specific .kt file that contained the main function, it was impossible because it says that I was trying to overload the main function. I always used main functions alongside specific kotlin files in the same project. Maybe it was the Gradle.. I don’t know what to do


12/23/2021, 9:42 PM
Check that your main does not return anything (returns just Unit)

Filipe Duarte

12/31/2021, 5:58 PM
Yup, strange behavior because it was possible to execute multiple .kt files independently in the same project. All of them had a main function that returns Unit. Maybe is something related to the Gradle. is it possible to do that same as scala? A file that contains object as App? Or a main function inside a object?