-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Heal type within quote internal encoding #11590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
val targs1 = targs.map(targ => TypeTree(heal(targ.tpe))) | ||
cpy.Apply(quote)(cpy.TypeApply(fn1)(fn0, targs1), body2 :: Nil) | ||
case quote: TypeApply => | ||
cpy.TypeApply(quote)(quote.fun, body2 :: Nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At line 119, body2
could be a block, and it's used as a type. I guess this case not reachable if body2
is a block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, is not reachable. This is essentially the same logic as in super.transformQuotation
.
case AnnotatedType(parent, annot) => AnnotatedType(mapOver(parent), annot) | ||
case _ => healTypeOfTerm(fn1.srcPos)(tp) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering why this is not already handled in the recursive call? Can it be handled in transform
? I'm wondering if it's possible to avoid the heal
TypeMap here and move the logic to healTypeOfTerm
-- as there's also a TypeMap there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved into healTypeOfTerm
1159170
to
8447d5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #11587