konsoletyper / teavm

Compiles Java bytecode to JavaScript, WebAssembly and C
https://teavm.org
Apache License 2.0
2.55k stars 261 forks source link

add scala compiler options. fix warnings #856

Closed xuwei-k closed 7 months ago

xuwei-k commented 7 months ago

fix following warnings

[Warn] my-teavm-path/samples/scala/src/teavm/scala/org/teavm/samples/scala/Calculator.scala:71:19: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method *,
or remove the empty argument list from its definition (Java-defined methods are exempt).
In Scala 3, an unapplied method like this will be eta-expanded into a function.
[Warn] my-teavm-path/samples/scala/src/teavm/scala/org/teavm/samples/scala/Calculator.scala:49:72: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method *,
or remove the empty argument list from its definition (Java-defined methods are exempt).
In Scala 3, an unapplied method like this will be eta-expanded into a function.
[Warn] my-teavm-path/samples/scala/src/teavm/scala/org/teavm/samples/scala/Calculator.scala:42:84: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method *,
or remove the empty argument list from its definition (Java-defined methods are exempt).
In Scala 3, an unapplied method like this will be eta-expanded into a function.
[Warn] my-teavm-path/samples/scala/src/teavm/scala/org/teavm/samples/scala/Calculator.scala:56:40: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method ?,
or remove the empty argument list from its definition (Java-defined methods are exempt).
In Scala 3, an unapplied method like this will be eta-expanded into a function.
[Warn] my-teavm-path/samples/scala/src/teavm/scala/org/teavm/samples/scala/Calculator.scala:65:61: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method *,
or remove the empty argument list from its definition (Java-defined methods are exempt).
In Scala 3, an unapplied method like this will be eta-expanded into a function.
[Warn] my-teavm-path/samples/scala/src/teavm/scala/org/teavm/samples/scala/Client.scala:9:33: procedure syntax is deprecated: instead, add `: Unit =` to explicitly declare `main`'s return type