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.
Questions
- What is a
Class+
( /Person+
... I'm assumingPerson
is a class) - It appears that being inherited is mutating the
Person
class in some way. What's going on here?