Struct
is defined in https://github.com/crystal-lang/crystal/blob/master/src/struct.cr as
struct Struct
end
and then you have
% crystal eval 'p {{ Struct.superclass }}'
Value
% crystal eval 'struct S; end; p {{ S.superclass }}'
Struct
Struct
is defined in https://github.com/crystal-lang/crystal/blob/master/src/struct.cr as
struct Struct
end
and then you have
% crystal eval 'p {{ Struct.superclass }}'
Value
% crystal eval 'struct S; end; p {{ S.superclass }}'
Struct
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.