在尝试online crystal compiler(这很棒)时,我遇到了一个错误,我似乎无法找到解释:
class Person
class Current < self
end
class Destroyed < self
end
end
错误:Person+ is not a class, it's a Person+
如果我将代码更改为
class Person
class Current < Person
end
class Destroyed < Person
end
end
一切正常。
如果我这样做
class Person
class Current < self
end
end
一切正常。
Class+
(/ Person+
......我假设Person
是一个班级)Person
类。这里发生了什么?正如@ RX14在评论中所述,事实证明这是一个错误。问题在这里开始:https://github.com/crystal-lang/crystal/issues/5495