pathTokens match {
case List("post") => ("post", "index")
case List("search") => ("search", "index")
case List() => ("home", "index")
} match {
case (controller, action) => loadController(http, controller, action)
case _ => null
}
Yo quería una coincidencia contigua. pero obtuve el error de compilación. :(Conversión contigua Scala
(pathTokens match {
case List("post") => ("post", "index")
case List("search") => ("search", "index")
case List() => ("home", "index")
}) match {
case (controller, action) => loadController(http, controller, action)
case _ => null
}
Cuando me envolví primer partido con parenparenthesis, funcionó bien Por qué necesito paréntesis aquí
Gracias por comentario útil. – drypot