Skip to content

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

Conversation

Blaisorblade
Copy link
Contributor

@Blaisorblade Blaisorblade commented Aug 24, 2018

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.

@Blaisorblade Blaisorblade self-assigned this Aug 24, 2018
@Blaisorblade Blaisorblade force-pushed the clarify-enclosedInvariants-dropInlined branch from 7305713 to cfd21a8 Compare August 25, 2018 00:08
@Blaisorblade

This comment has been minimized.

@Blaisorblade Blaisorblade force-pushed the clarify-enclosedInvariants-dropInlined branch from cfd21a8 to ed3137f Compare August 27, 2018 13:02
@Blaisorblade
Copy link
Contributor Author

Moved the failing test to #5048; this PR is now cleanup-only.

@Blaisorblade Blaisorblade removed their assignment Aug 27, 2018
@Blaisorblade
Copy link
Contributor Author

Failure is spurious (#5021).

@Blaisorblade Blaisorblade self-assigned this Aug 27, 2018
@Blaisorblade
Copy link
Contributor Author

@nicolasstucki I think you picked everything useful from here? Can I close? Assigning to you for the moment (feel free to reassign back).

Copy link
Contributor

@nicolasstucki nicolasstucki left a 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`
Copy link
Contributor

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.

@odersky
Copy link
Contributor

odersky commented Jan 12, 2019

@Blaisorblade Can we get this over the finish line please?

@Blaisorblade
Copy link
Contributor Author

Asked, @nicolasstucki confirms this code is going to be refactored significantly by your current position changes. So closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants