playframework/playframework

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

Aberta

#10.204 aberto em 21 de abr. de 2020

 (6 comentários) (0 reação) (0 responsável)Scala (4.032 forks)batch import
help wantedtype:improvement

Métricas do repositório

Stars
 (12.623 estrelas)
Métricas de merge de PR
 (Mesclagem média 10d 17h) (69 fundiu PRs em 30d)

Description

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.

Guia do colaborador