为什么or equals会在coffeescript中破坏我的REPL?

为什么or equals会在coffeescript中破坏我的REPL?,coffeescript,Coffeescript,如果我使用Coffeescript 1.3.3打开一个REPL并键入: y ?= 5 或 我得到一个未定义y的错误。。。对于编译,最后一个是有效的,但第一个仍然是错误的。。这是预期的吗 coffee> y = 5 5 coffee> y ||= 6 Error: In repl, the variable "y" can't be assigned with ||= because it has not been defined. 这是因为每个评估都涉及单独的编译。解决方法是将其

如果我使用Coffeescript 1.3.3打开一个REPL并键入:

y ?= 5

我得到一个未定义y的错误。。。对于编译,最后一个是有效的,但第一个仍然是错误的。。这是预期的吗

coffee> y = 5
5
coffee> y ||= 6
Error: In repl, the variable "y" can't be assigned with ||= because it has not been defined.
这是因为每个评估都涉及单独的编译。解决方法是将其作为全局对象的属性进行访问

coffee> y = 5
5
coffee> global.y
5
coffee> @y
5
coffee> @y &&= 6
6
coffee> y
6

你能显示实际的错误信息吗?这是实际的错误信息:y?=5错误:在repl中,变量“y”不能被分配?=因为它还没有被定义。matyr要更正,但要清楚,这是一个已知的错误:谢谢Trevor,非常感谢。
coffee> y = 5
5
coffee> global.y
5
coffee> @y
5
coffee> @y &&= 6
6
coffee> y
6