Skip to content

Commit

Permalink
Merge pull request #9932 from retronym/merge/2.12.x-to-2.13.x-20220210
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue committed Feb 12, 2022
2 parents 42e1a9f + 26e4ac1 commit 9312709
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,8 @@ lazy val junit = project.in(file("test") / "junit")
libraryDependencies ++= Seq(junitInterfaceDep, jolDep, diffUtilsDep),
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v", "-s"),
Compile / unmanagedSourceDirectories := Nil,
Test / unmanagedSourceDirectories := List(baseDirectory.value)
Test / unmanagedSourceDirectories := List(baseDirectory.value),
Test / headerSources := Nil,
)

lazy val tasty = project.in(file("test") / "tasty")
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")

libraryDependencies ++= Seq(
"org.eclipse.jgit" % "org.eclipse.jgit" % "4.11.9.201909030838-r",
"org.slf4j" % "slf4j-nop" % "1.7.33",
"org.slf4j" % "slf4j-nop" % "1.7.35",
"com.googlecode.java-diff-utils" % "diffutils" % "1.3.0",
)

Global / concurrentRestrictions := Seq(
Tags.limitAll(1) // workaround for https://github.com/sbt/sbt/issues/2970
)

addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.5")

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
12 changes: 4 additions & 8 deletions src/reflect/scala/reflect/internal/Definitions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1834,18 +1834,14 @@ trait Definitions extends api.StandardDefinitions {

lazy val PartialManifestClass = getTypeMember(ReflectPackage, tpnme.ClassManifest)
lazy val ManifestSymbols = Set[Symbol](PartialManifestClass, FullManifestClass, OptManifestClass)
private lazy val PolymorphicSignatureClass = MethodHandleClass.companionModule.info.decl(TypeName("PolymorphicSignature"))
private val PolymorphicSignatureName = TypeName("java.lang.invoke.MethodHandle$PolymorphicSignature")

def isPolymorphicSignature(sym: Symbol) = sym != null && sym.isJavaDefined && {
val owner = sym.safeOwner
(owner == MethodHandleClass || owner == VarHandleClass) && {
if (PolymorphicSignatureClass eq NoSymbol) {
// Hack to find the annotation under `scalac -release 8` on JDK 9+, in which the lookup of `PolymorphicSignatureClass` above fails
// We fall back to looking for a stub symbol with the expected flattened name.
sym.annotations.exists(_.atp.typeSymbolDirect.name == PolymorphicSignatureName)
}
else sym.hasAnnotation(PolymorphicSignatureClass)
sym.hasAnnotation(NativeAttr) && (sym.paramss match {
case List(List(p)) => definitions.isJavaRepeatedParamType(p.info)
case _ => false
})
}
}

Expand Down

0 comments on commit 9312709

Please sign in to comment.