playframework/playframework

Unable to create a routes file with same name as a method in Predef

Offen

#10.204 geöffnet am 21.04.2020

 (6 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Scala (4.032 Forks)batch import
help wantedtype:improvement

Repository-Metriken

Stars
 (12.623 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 10T 17h) (69 gemergte PRs in 30 T)

Beschreibung

I created a Play routes file with

/some-endpoint                         identity.Routes

The compiler barfed with this:

stable identifier required, but scala.Predef.identity[Nothing] found.
[error] ->          /some-endpoint                          identity.Routes

Looks like the compiler can't differentiate between a user-defined name for a route file and the Predef identity method. Is this a bug in Play.

Contributor Guide