While experimenting with the online crystal compiler (which is awesome), I've run into an error which I can't seem to find an explanation for:
class Person
class Current < self
end
class Destroyed < self
end
end
Error: Person+ is not a class, it's a Person+
If I change the code to
class Person
class Current < Person
end
class Destroyed < Person
end
end
Then everything works fine.
If I just do
class Person
class Current < self
end
end
Then everything works fine.
Class+
( / Person+
... I'm assuming Person
is a class)Person
class in some way. What's going on here?As @RX14 stated in a comment, turns out this is a bug. Issue opened here: https://github.com/crystal-lang/crystal/issues/5495