Skip to content

Upgrade to Scala.js 0.6.8. #1183

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 1 commit into from
Mar 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

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

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.7")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.8")
21 changes: 4 additions & 17 deletions src/dotty/tools/backend/sjs/JSCodeGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -557,21 +557,7 @@ class JSCodeGen()(implicit ctx: Context) {
}
}

/* Work around https://github.com/scala-js/scala-js/issues/2259
* TODO Remove this when we upgrade to Scala.js 0.6.8.
*/
val methodDef1 = if (!sym.owner.is(Trait)) {
methodDef
} else {
val workaroundBody = js.Block(
js.Apply(js.ClassOf(jstpe.ClassType(encodeClassFullName(sym.owner))),
js.Ident("isPrimitive__Z"), Nil)(jstpe.BooleanType),
methodDef.body)
methodDef.copy(body = workaroundBody)(
methodDef.optimizerHints, methodDef.hash)
}

Some(methodDef1)
Some(methodDef)
}
}
}
Expand Down Expand Up @@ -2386,8 +2372,9 @@ class JSCodeGen()(implicit ctx: Context) {

/** Gen JS code to load the JavaScript global scope. */
private def genLoadJSGlobal()(implicit pos: Position): js.Tree = {
// TODO Change this when upgrading to Scala.js 0.6.8
js.JSBracketSelect(js.JSEnvInfo(), js.StringLiteral("global"))
js.JSBracketSelect(
js.JSBracketSelect(js.JSLinkingInfo(), js.StringLiteral("envInfo")),
js.StringLiteral("global"))
}

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