Set the inlining phase in the Context used for checking macro trees #20087
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.
Fixes #17009
The problem here was with the sub typing check for
line.split(" ").nn
, which needed to confirm that:TypeComparer
would eventually try to compare two skolem types:The behavior of
TypeComparer
differs here when executed during the typer phase, where it always returns false for two skolem types, without checking the sub typing further. This makes sense for Typer, but not so much for the macro checks, which fortransparent inline
s end up being executed during Typer. I think the best solution here is to artificially change the phase in the checkingContext, so the checks done for transparent and non-transparent macros are the same.