-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disambiguate akka-http when optional parameter lists are specified #250
Disambiguate akka-http when optional parameter lists are specified #250
Conversation
Is there no better way to do this? All the |
I'm working against scalameta/scalameta#1634, unfortunately. path("foo") {
complete(200)
} gets translated into Term.Apply(
Term.Apply(Term.Name("path"), Lit.String("foo")),
Term.Block(List(Term.Apply(Term.Name("complete"), Lit.Int(200))))
) when generated, but Term.Apply(
Term.Apply(Term.Name("path"), Lit.String("foo")),
Term.Apply(Term.Name("complete"), Lit.Int(200))
) when parsed. I tried a bunch of different ways to avoid this, but was ultimately unsuccessful. Now, however, scalac treats An alternate strategy here could be fixing Let me try that instead. |
fd2f265
to
d4aee9b
Compare
d4aee9b
to
7552338
Compare
@kelnos OK, I was able to constrain it to just the offending parameter(Symbol(${arg}).as[${tpe}].*).map(xs => Option(xs)).apply |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, that's much nicer! :)
Resolves: #249
type: array
parameters, adds afilter(_.nonEmpty)
, removing the possibility ofSome(Nil)
Contributing to Twilio