Simplify and correctify calculation of the InnerClass attribute #15153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a part of porting the backend improvements introduced in Scala 2 #14912 and corresponds to scala/scala#4807
Original PR description:
Similarly to the original repo
CoreBTypes
naming convention has been unified and cleaned up from not used references.The original collection of nested classes signatures was replaced with extended version of
NestedClassesCollector
present in the current Scala 2 main branch https://github.com/scala/scala/blob/724be0e9425b9ad07c244d25efdad695d75abbcf/src/compiler/scala/tools/nsc/backend/jvm/analysis/BackendUtils.scala#L790Generation of ClassBType for mirrors has been added by porting implementation from Scala 2 and definitions of MethodHandles has been updated to make sure that given ClassBTypes are loaded and reachable. This is needed since in Scala 3 we only use ClassBTypes created from Symbols, whereas in Scala 2 their instances could have been also loaded from Classfiles.