place the main code inside a kotlin class file, not in a plain kt file



Code:

class Tester {

}

fun main(args:Array<String>) {

    val age = 0 // implicit var declaration



    val isCompleted = false // explicit var declaration



    val num = 2 // constant takes less space than var



    println("test")

}


kotlin Error: Could not find or load main class _DefaultPackage Kotlin-bug