We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It'd be great to have support for matching over repetitive patterns in trees:
val q"def foo(..{$names: $tpes = $defaults})" = q"def foo(x: X, y: Y = Y(0))" // names == List(TermName("x"), TermName("y")) // tpes == List(tq"X", tq"Y") // defaults == List(q"", q"Y(0)")
Currently one has to write:
val q"def foo(..$params)" = q"def foo(x: X, y: Y = Y(0))" val names = params.map { case q"$_ val $name: $_ = $_" => name } val tpes = params.map { case q"$_ val $_ : $tpe = $_" => tpe } val defaults = params.map { case q"$_ val $_ : $_ = $default" => default }
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-8164?orig=1 Reporter: @densh
Sorry, something went wrong.
closing all quasiquotes tickets; see #10755
No branches or pull requests
It'd be great to have support for matching over repetitive patterns in trees:
Currently one has to write:
The text was updated successfully, but these errors were encountered: