I have a simple hello world project in Kotlin, running in Intellij Idea. I can build and run it just fine, but if I make changes, save and press the green run button (or Shift+F10), Intellij runs the old version of the file, before I made the changes. I can fix this by first Building the project (Ctrl+F9), then running it (Shift+F10). Why is this? Must I always build first, then run? Why doesn't Run build the project for me?
Here is my code, though I'm sure that's not the problem:
fun main(args: Array<String>) {
println("hello world")
}