-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Regression macro matching with Varargs fails: Sequence argument type annotation *
cannot be used here
#19709
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
Comments
Edit: sorry, I missed that the ticket is for 3.3, I assumed 3.4. I see So
That is different from my normal expectation about |
*
cannot be used here*
cannot be used here
This error is correct [error] 1753 | case '{ List[String].apply(${Varargs(Exprs(elems))}: _*) } =>
[error] | ^^^^^^^^^^^^
[error] | missing argument list for method apply in trait IterableFactory
[error] |
[error] | def apply[A](elems: A*): CC[A] The type argument of the apply should not be added directly on the list The following version work: case '{ List.apply[String](${Varargs(Exprs(elems))}: _*) } => ... // derprecated `: _*` syntax
case '{ List[String](${Varargs(Exprs(elems))}: _*) } => ... // derprecated `: _*` syntax
case '{ List.apply[String](${Varargs(Exprs(elems))}*) } => ...
case '{ List[String](${Varargs(Exprs(elems))}*) } => ... // probably the best version |
We do need to update the documentation to avoid using the deprecated |
Example update in scala/docs.scala-lang#2980 |
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
Was working with version 3.2.2. Now fails with 3.3.1. Basis for is code was the example in this page.
EDIT: This seems to be working in 3.3.0.
Minimized code
Output
Expectation
Was hoping no changes were needed for the upgrade.
The text was updated successfully, but these errors were encountered: