-
Notifications
You must be signed in to change notification settings - Fork 1.1k
enclosingInlineds: Clarify invariants #5009
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
enclosingInlineds: Clarify invariants #5009
Conversation
7305713
to
cfd21a8
Compare
This comment has been minimized.
This comment has been minimized.
cfd21a8
to
ed3137f
Compare
Moved the failing test to #5048; this PR is now cleanup-only. |
Failure is spurious (#5021). |
@nicolasstucki I think you picked everything useful from here? Can I close? Assigning to you for the moment (feel free to reassign back). |
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.
Need to rebase
@@ -385,8 +385,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { | |||
case SeqLiteral(elems, elemtpt) => | |||
"[" ~ toTextGlobal(elems, ",") ~ " : " ~ toText(elemtpt) ~ "]" | |||
case tree @ Inlined(call, bindings, body) => | |||
(("/* inlined from " ~ toText(call) ~ " */ ") `provided` | |||
!call.isEmpty && !homogenizedView && !ctx.settings.YshowNoInline.value) ~ | |||
((if (!call.isEmpty) "/* inlined from " ~ toText(call) ~ " */ " else "/* inline arg */ ": Text) `provided` |
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.
This change should be reverted, we already do this with a slightly different logic.
@Blaisorblade Can we get this over the finish line please? |
Asked, @nicolasstucki confirms this code is going to be refactored significantly by your current position changes. So closing. |
WIP, followup to #4990 and #4949.
I also tried ensuring parameters are always nested in calls and boy is that false - we forget using inlineContext often enough, which could be a trap if we use implicit conversion
sourcePos
.