Well, Kotlin script files (being scripts) can contain arbitrary statements at top level (e.g., loops, function calls, etc.). Regular Kotlin files allow only declarations at top level. Hence, the difference you encountered )))
s
Sebastian Kaspari
09/09/2020, 8:51 AM
Oh, of course! Somehow I totally missed that you actually cannot have top level statements in regular Kotlin files. Now it is obvious. Thank you!