-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Stop emitting fields for inlined fields. #1890
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
828d2a0
to
12d0189
Compare
ctx.scala2Mode (stay compatible with Scala2 for now) */ | ||
} | ||
val sym = vdef.symbol | ||
skipBlocks(vdef.rhs) match { |
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.
No that's not right. The right hand side can also be an Ident and a Select with ConstantType.
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 think the right body is:
val sym = vdef.symbol
sym.info match {
case info: ConstantType if isFinalInlinableVal(sym) => sym.flags |= Inline
case _ =>
}
Also, I think it's cleaner to revert the original commit(s) of #1879 and then add the new changes. |
Ok, I will revert the changes and clean up the history. |
fc7bd7c
to
6e3065f
Compare
6e3065f
to
1cb50ca
Compare
Reverted 63d68bf and reimplemented cleanly. |
LTTM 👍 |
Also move final val inlining logic to Inline as mentioned in #1879.