Skip to content

Commit f8ebf77

Browse files
committed
Merge pull request #1183 from sjrd/scalajs-0.6.8
Upgrade to Scala.js 0.6.8.
2 parents a675cbf + b17951d commit f8ebf77

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
77

88
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")
99

10-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.7")
10+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.8")

src/dotty/tools/backend/sjs/JSCodeGen.scala

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -557,21 +557,7 @@ class JSCodeGen()(implicit ctx: Context) {
557557
}
558558
}
559559

560-
/* Work around https://github.com/scala-js/scala-js/issues/2259
561-
* TODO Remove this when we upgrade to Scala.js 0.6.8.
562-
*/
563-
val methodDef1 = if (!sym.owner.is(Trait)) {
564-
methodDef
565-
} else {
566-
val workaroundBody = js.Block(
567-
js.Apply(js.ClassOf(jstpe.ClassType(encodeClassFullName(sym.owner))),
568-
js.Ident("isPrimitive__Z"), Nil)(jstpe.BooleanType),
569-
methodDef.body)
570-
methodDef.copy(body = workaroundBody)(
571-
methodDef.optimizerHints, methodDef.hash)
572-
}
573-
574-
Some(methodDef1)
560+
Some(methodDef)
575561
}
576562
}
577563
}
@@ -2386,8 +2372,9 @@ class JSCodeGen()(implicit ctx: Context) {
23862372

23872373
/** Gen JS code to load the JavaScript global scope. */
23882374
private def genLoadJSGlobal()(implicit pos: Position): js.Tree = {
2389-
// TODO Change this when upgrading to Scala.js 0.6.8
2390-
js.JSBracketSelect(js.JSEnvInfo(), js.StringLiteral("global"))
2375+
js.JSBracketSelect(
2376+
js.JSBracketSelect(js.JSLinkingInfo(), js.StringLiteral("envInfo")),
2377+
js.StringLiteral("global"))
23912378
}
23922379

23932380
/** Generate a Class[_] value (e.g. coming from classOf[T]) */

0 commit comments

Comments
 (0)