Skip to content

Vararg unquote with non-identifier fails to compile #27

@LPTK

Description

@LPTK

See the example:

code"Seq(1,2,3)" match {
  case code"Seq[Int]($xs*)" =>
    val xs2 = c"0" +: xs
    code"Seq[Int](${xs2}*)" // works fine
    // a current limitation/bug prevents the following syntax:
    // code"Seq[Int](${c"0" +: xs}*)"
    //   Embedding Error: Quoted expression does not type check: type mismatch;
    //     found: Any; required: Seq[Embedding.IR[Int,?]])
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions