What is this sorcery?

Struct is defined in https://github.com/crystal-lang/crystal/blob/master/src/struct.cr as

struct Struct

and then you have

% crystal eval 'p {{ Struct.superclass }}'
% crystal eval 'struct S; end; p {{ S.superclass }}'
1 Like

All of the essential types are defined by the compiler before reading the prelude files:

That said, it wouldn’t hurt if those definitions do struct Struct < Value, but in reality they are reopening said types.

Aaahhh, going to read that file.