-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Do not generate _N members for case classes in stdlib-bootstrapped #18117
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
Do not generate _N members for case classes in stdlib-bootstrapped #18117
Conversation
2a1ea2d
to
600a512
Compare
600a512
to
6aa10c2
Compare
val paramNames = ctx.owner.owner.info.decls.toList.filter(_.flags.is(ParamAccessor)).map(_.name) | ||
// case N => this.${paramNames(N)} | ||
val cases = paramNames.zip(0.until(arity)).map { (name, i) => | ||
val sel = This(clazz).select(name, _.info.isParameterless) |
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 not directly select the symbol found above instead?
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 followed the previous implementation too closely. Now I am selecting the symbols directly. I also used zipWithIndex
instead of the zip with the range.
6aa10c2
to
1fac412
Compare
@smarter I also updated the MiMaFilters. You should double-check those changes. |
project/MiMaFilters.scala
Outdated
@@ -97,6 +92,9 @@ object MiMaFilters { | |||
ProblemFilters.exclude[MissingTypesProblem]("scala.jdk.IntAccumulator"), | |||
ProblemFilters.exclude[MissingTypesProblem]("scala.jdk.LongAccumulator"), | |||
ProblemFilters.exclude[FinalClassProblem]("scala.collection.ArrayOps$ReverseIterator"), | |||
ProblemFilters.exclude[FinalClassProblem]("scala.Tuple1"), | |||
ProblemFilters.exclude[FinalClassProblem]("scala.Tuple2"), | |||
ProblemFilters.exclude[MissingFieldProblem]("scala.Tuple*._*"), // Tuple1._1, Tuple2._1, Tuple2._2 |
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.
Where does this difference come from?
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.
Not sure if it is a specialization anymore. I will have to investigate further into this one.
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 recategorized these failures
1fac412
to
c199e45
Compare
c199e45
to
df3968b
Compare
Follow-up of #17928