Scala Programming Language
  1. Scala Programming Language
  2. SI-8148

support of anonymous arguments broken in quasiquotes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: Scala 2.11.0-M7
    • Fix Version/s: Scala 2.11.0-M8
    • Component/s: Macros
    • Labels:
      None
    • Environment:

      2.11-M7

      Description

      scala> (1 to 10).reduce(_ + _)
      res1: Int = 55

      scala> q"(1 to 10).reduce(_ + _)"
      res2: reflect.runtime.universe.Tree = 1.to(10).reduce(((x$1, x$1) => x$1.$plus(x$1)))

      scala> tb.typeCheck(res2)
      scala.tools.reflect.ToolBoxError: reflective typecheck has failed: x$1 is already defined as (compiler-generated) value x$1

      scala> q"(1 to 10).reduce(_ + _)"
      res3: reflect.runtime.universe.Tree = 1.to(10).reduce(((x$2, x$2) => x$2.$plus(x$2)))

        Activity

        Show
        Adriaan Moors added a comment - https://github.com/scala/scala/pull/3372

          People

          • Assignee:
            Denys Shabalin
            Reporter:
            Dmitry Petrashko
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development