semcheck substitution output of invoked generic types #332
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows things like nested generics to compile due to converting InvokeT types to sym types.
The symbol is saved to the type instantiation cache before semchecking so that recursive types do not try to infinitely create a new instantiation. However the type symbol cannot be loaded until the semchecking is done, so if anything tries to introspect the type in its own definition it will fail when trying to load it. For now this is not an issue. Maybe a solution is to perform a
SemcheckTopLevelSyms
phase on the substituted type first, though the AST of the symbol would then be substituted but not semchecked type AST.A followup would be to inline the produced types if they are structural instead of giving their symbols. Edit: Actually this is just a
semTypeSym
call, and requires getting the symbol AST which needs theSemcheckTopLevelSyms
phase anyway. Can do these here or in a followup: #333