From f1b4c22ce6a4c78d5e693e92e90bfcdb76cf639d Mon Sep 17 00:00:00 2001 From: FabioPinheiro Date: Wed, 10 Jun 2020 00:48:00 +0100 Subject: [PATCH] Upgrade to Scala.js 1.1.0. JSCodeGen was changed according to scala-js/scala-js#4040 --- compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala | 4 ++-- project/plugins.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala b/compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala index 89915e44eb16..449aa3db5dce 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala @@ -1532,9 +1532,9 @@ class JSCodeGen()(implicit ctx: Context) { case jstpe.LongType => js.BinaryOp(js.BinaryOp.Long_-, js.LongLiteral(0), genArg) case jstpe.FloatType => - js.BinaryOp(js.BinaryOp.Float_-, js.FloatLiteral(0.0f), genArg) + js.BinaryOp(js.BinaryOp.Float_*, js.FloatLiteral(-1.0f), genArg) case jstpe.DoubleType => - js.BinaryOp(js.BinaryOp.Double_-, js.DoubleLiteral(0), genArg) + js.BinaryOp(js.BinaryOp.Double_*, js.DoubleLiteral(-1.0), genArg) } case NOT => diff --git a/project/plugins.sbt b/project/plugins.sbt index b15e4bddc084..3bd13eb7f13e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,7 +2,7 @@ // // e.g. addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.1.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.1.0") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.6")