Skip to content

Commit d16a1da

Browse files
committed
Update to new version of DottyBackendInterface.
That knows that there exists only single magical array method.
1 parent 2828ef1 commit d16a1da

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ object DottyBuild extends Build {
7777
com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys.withSource := true,
7878

7979
// get libraries onboard
80-
partestDeps := Seq("me.d-d" % "scala-compiler" % "2.11.5-20151022-113908-7fb0e653fd",
80+
partestDeps := Seq("me.d-d" % "scala-compiler" % "2.11.5-20160322-171045-e19b30b3cd",
8181
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
8282
"org.scala-lang" % "scala-library" % scalaVersion.value % "test"),
8383
libraryDependencies ++= partestDeps.value,

src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,8 @@ class DottyBackendInterface(outputDirectory: AbstractFile)(implicit ctx: Context
153153
}.toMap
154154
def unboxMethods: Map[Symbol, Symbol] = defn.ScalaValueClasses().map(x => (x, Erasure.Boxing.unboxMethod(x.asClass))).toMap
155155

156-
private val mkArrayNames: Set[Name] = Set("Byte", "Float", "Char", "Double", "Boolean", "Unit", "Long", "Int", "Short"/*, "Ref"*/).map{ x=>
157-
("new" + x + "Array").toTermName
158-
}
159-
160-
val dottyArraysModuleClass = toDenot(defn.DottyArraysModule).moduleClass.asClass
161-
162-
163156
override def isSyntheticArrayConstructor(s: Symbol) = {
164-
(toDenot(s).maybeOwner eq dottyArraysModuleClass) && mkArrayNames.contains(s.name)
157+
s eq defn.newArrayMethod
165158
}
166159

167160
def isBox(sym: Symbol): Boolean = Erasure.Boxing.isBox(sym)

0 commit comments

Comments
 (0)