You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When foo is given a sequence with a varargs type ascription in the following code, ys isn't actually a sequence of integer expressions—it's more like a c.Expr[Seq[Int]].
We get an unhelpful error message when calling foo with a type-ascripted sequence:
scala>MacroExample.foo(List(1, 2, 3): _*)
<console>:8:error: no `: _*' annotation allowed here
(such annotations are only allowed in arguments to *-parameters)
MacroExample.foo(List(1, 2, 3): _*)
^
When foo is given a sequence with a varargs type ascription in the following code, ys isn't actually a sequence of integer expressions—it's more like a c.Expr[Seq[Int]].
Given the following, for example:
We get an unhelpful error message when calling foo with a type-ascripted sequence:
And even stranger behavior with bar:
See this Stack Overflow question and this example for more discussion.
The text was updated successfully, but these errors were encountered: