如何在Kotlin REPL中加载文件

根据:help在Kotlin REPL中的:help ,我可以通过load:命令加载文件。

 >>> :help Available commands: :help show this help :quit exit the interpreter :dump bytecode dump classes to terminal :load <file> load script from specified file 

但加载文件失败像这样。 Rational.kt存在当前目录。

 >>> load: "Rational.kt"; error: unexpected tokens (use ';' to separate expressions on the same line) load: "Rational.kt"; 

既不load: Rational.ktload: "Rational.kt"作品。 如何在REPL中加载文件? 我找不到一个例子。

尝试没有引号:

>>> :load Rational.kt