You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[warn] D:\workspace\example\app\controllers\HomeController.scala:15:36: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method index,
[warn] or remove the empty argument list from its definition (Java-defined methods are exempt).
[warn] In Scala 3, an unapplied method like this will be eta-expanded into a function.
[warn] Redirect(routes.HomeController.index)
[warn] ^
[warn] one warning found
When the index was defined as def index() = Action{...}, we need to change to Redirect(routes.HomeController.index()).
However the index method has no side-effect. so it is defined as def index = Action{...}.
We expect that Play's routes generator generates no-parentheses method.
mkurz
changed the title
Routes what are generated by play has the warning 'auto-application ()' in Scala2.13.3
Generated reverse route method should have empty parentheses () depending on routes file
Feb 1, 2021
Play Version
2.8.2
API
Scala
Operating System
Not related to this problem
JDK
Not related to this problem
Library Dependencies
non
Expected Behavior
No warning in Scala2.13.3.
Actual Behavior
Warning is displayed.
Related resources
The text was updated successfully, but these errors were encountered: