8000 Forward port java annotation handling by som-snytt · Pull Request #10032 · scala/scala · GitHub
[go: up one dir, main page]

Skip to content

Forward port java annotation handling #10032

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

Merged
merged 3 commits into from
May 10, 2022

Conversation

som-snytt
Copy link
Contributor
@som-snytt som-snytt commented May 10, 2022

Further improve

#9981

by forward porting

#10016

and then get carried away a bit with tweaks.

@scala-jenkins scala-jenkins added this to the 2.13.10 milestone May 10, 2022
@som-snytt som-snytt marked this pull request as ready for review May 10, 2022 02:56
@SethTisue SethTisue modified the milestones: 2.13.10, 2.13.9 May 10, 2022
@SethTisue SethTisue added the prio:hi high priority (used only by core team, only near release time) label May 10, 2022
@lrytz lrytz merged commit 0b90bde into scala:2.13.x May 10, 2022
@@ -865,7 +854,7 @@ abstract class ClassfileParser(reader: ReusableInstance[ReusableDataReader]) {
case tpnme.RuntimeAnnotationATTR =>
val numAnnots = u2()
val annots = new ListBuffer[AnnotationInfo]
for (n <- 0 until numAnnots; annot <- parseAnnotation(u2()))
for (n <- 0 until numAnnots; annot <- parseAnnotation(u2()))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Distracted by indent, forgot to use fancy times.

@@ -1502,3 +1492,8 @@ abstract class ClassfileParser(reader: ReusableInstance[ReusableDataReader]) {
protected def getScope(flags: JavaAccFlags): Scope =
if (flags.isStatic) staticScope else instanceScope
}
object ClassfileParser {
private implicit class GoodTimes(val n: Int) extends AnyVal {
def times(body: => Unit) = (1 to n).foreach(_ => body)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have gone while here.

@som-snytt som-snytt deleted the issue/12565-improved branch May 10, 2022 14:04
@SethTisue SethTisue removed the prio:hi high priority (used only by core team, only near release time) label May 10, 2022
@lrytz lrytz mentioned this pull request Jun 8, 2022
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.

4 participants
0