diff --git a/samples/scala/build.gradle.kts b/samples/scala/build.gradle.kts index ca818b6ef..229a786cb 100644 --- a/samples/scala/build.gradle.kts +++ b/samples/scala/build.gradle.kts @@ -29,3 +29,10 @@ teavm.js { addedToWebApp = true mainClass = "org.teavm.samples.scala.Client" } + +tasks.withType { + scalaCompileOptions.additionalParameters = listOf( + "-feature", + "-deprecation", + ) +} diff --git a/samples/scala/src/teavm/scala/org/teavm/samples/scala/Client.scala b/samples/scala/src/teavm/scala/org/teavm/samples/scala/Client.scala index ea08a6847..ae2cff137 100644 --- a/samples/scala/src/teavm/scala/org/teavm/samples/scala/Client.scala +++ b/samples/scala/src/teavm/scala/org/teavm/samples/scala/Client.scala @@ -6,7 +6,7 @@ import org.teavm.jso.dom.html._ import org.teavm.samples.scala.Calculator.{eval, parse, print} object Client { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val doc = HTMLDocument.current val exprElem = doc.getElementById("expr").asInstanceOf[HTMLInputElement] val calcElem = doc.getElementById("calculate") diff --git a/samples/scala/src/teavm/scala/org/teavm/samples/scala/Grammar.scala b/samples/scala/src/teavm/scala/org/teavm/samples/scala/Grammar.scala index c5ac9b818..16cf31236 100644 --- a/samples/scala/src/teavm/scala/org/teavm/samples/scala/Grammar.scala +++ b/samples/scala/src/teavm/scala/org/teavm/samples/scala/Grammar.scala @@ -17,11 +17,11 @@ trait Rule[T] { def |(other: => Rule[T]): Rule[T] = Rule.firstOf(this, other) - def *(): Rule[List[T]] = Rule.unlimited(this) + def * : Rule[List[T]] = Rule.unlimited(this) def >>[S](f: T => S): Rule[S] = Rule.andThen(this, f) - def ?(): Rule[Option[T]] = Rule.optional(this) + def ? : Rule[Option[T]] = Rule.optional(this) def debug(str: String) = Rule.rule { x => val (result, rem) = parse(x)