8000 Pass boolean literal args as named arg in generated routes files · playframework/playframework@4cdd012 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4cdd012

Browse files
committed
Pass boolean literal args as named arg in generated routes files
Fixes scala/scala#10612 (cherry picked from commit a1ca2b3)
1 parent 79362ee commit 4cdd012

File tree

2 files changed

+3
-2
lines changed
  • dev-mode
    • play-routes-compiler/src/main/scala/play/routes/compiler
    • sbt-plugin/src/sbt-test/play-sbt-plugin/routes-compiler-routes-compilation/tests

2 files changed

+3
-2
lines changed

dev-mode/play-routes-compiler/src/main/scala/play/routes/compiler/RoutesModels.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ trait PathPart
126126
* @param encode Whether this part should be encoded or not.
127127
*/
128128
case class DynamicPart(name: String, constraint: String, encode: Boolean) extends PathPart with Positional {
129-
override def toString = """DynamicPart("""" + name + "\", \"\"\"" + constraint + "\"\"\"," + encode + ")" // "
129+
override def toString =
130+
"""DynamicPart("""" + name + "\", \"\"\"" + constraint + "\"\"\", encodeable=" + encode + ")" // "
130131
}
131132

132133
/**

dev-mode/sbt-plugin/src/sbt-test/play-sbt-plugin/routes-compiler-routes-compilation/tests/RouterSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ object RouterSpec extends PlaySpecification {
102102
whenNoValue: Future[play.api.mvc.Result] => Any,
103103
whenNoParam: Future[play.api.mvc.Result] => Any
104104
) =
105-
testQueryParamBinding(paramType, path, successParams, expectationSuccess, whenNoValue, whenNoParam, true)
105+
testQueryParamBinding(paramType, path, successParams, expectationSuccess, whenNoValue, whenNoParam, withDefault = true)
106106

107107
private def testQueryParamBinding(
108108
paramType: String,

0 commit comments

Comments
 (0)
0