-
Notifications
You must be signed in to change notification settings - Fork 337
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
bugfix: emit as extension method if member of implicit class with val in constructor #6190
bugfix: emit as extension method if member of implicit class with val in constructor #6190
Conversation
indent, | ||
isAfterNewline = false, | ||
currRegion, | ||
if (isInParen) expectTemplate else newExpectIgnoreBody |
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.
Why this change?
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.
implicit class A(val v: Int) {
}
So when we are on class
we'll add something like expect implicit class body, and then in parenthesis we'll emit val v
but we want to keep the information about the "expect implicit class body", since it will be needed to construct correct region on {
.
I wanted to write that this is safe, since there are no { }
inside the constructor definition, but I'm second guessing this because of RefinedTypes
.
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.
Fixed for refined types.
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
// additionalSymbolCheck(doc.symbols) | ||
// val symbols = doc.symbols.map(_.symbol).toList |
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.
Leftover?
connected to: #6156 (comment)