Closed vitiral closed 1 year ago
I'm very close. There were a LOT of changes necessary to get this rolling.
The main thing left now is proper handling of Self
, which might be... challenging.
I may need a selfStk... or something similar. Basically the type checker needs to know what to convert Self into!
It would be nice if this could be a generalized solution so that I can use it for generics in the future as well. Basically it would be nice if syn functions could interface with some kind of "stack" of mappings from GenericType -> ConcreteType
. I would directly use this when accessing methods/etc.
I'm not quite sure I understand the problem space here, but feels like it should be straightforward! I can at least create a specialized case for role in the meantime if I can't think of anything.
It should be noted that if I can create a specialized case then that means that others can create their own specialized cases. Basically that can create "native" types that are fake and can't actually be concrete.
This is now implemented
I'm adding
role
to the compilerSelf
type, which is just a native type (like U2, U4, S)