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

Import aliased to _ can be referenced with `_`.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Scala 2.9.2
    • Fix Version/s: 2.12.0-M1
    • Component/s: Type Checker
    • Labels:

      Description

      scala> import collection.{mutable => _, _}; `_`.Buffer(0)
      import collection.{mutable=>_, _}
      res0: scala.collection.mutable.Buffer[Int] = ArrayBuffer(0)
      

        Issue Links

          Activity

          Show
          Paul Phillips added a comment - https://github.com/scala/scala/commit/b5e3eafabe
          Hide
          Adriaan Moors added a comment -

          reopening for 2.10.1-RC1 backport

          Show
          Adriaan Moors added a comment - reopening for 2.10.1-RC1 backport
          Show
          James Iry added a comment - https://github.com/scala/scala/pull/2015
          Hide
          Travis Brown added a comment -

          The fix ("wildcard invalid as backquoted identifier") unfortunately breaks interoperability with Java, where a single underscore is a perfectly valid identifier.

          See this question for some additional discussion: http://stackoverflow.com/q/17863794/334519

          Show
          Travis Brown added a comment - The fix ("wildcard invalid as backquoted identifier") unfortunately breaks interoperability with Java, where a single underscore is a perfectly valid identifier. See this question for some additional discussion: http://stackoverflow.com/q/17863794/334519
          Hide
          Adriaan Moors added a comment -

          I agree that was the wrong fix. We should've changed the name under which those hidden imports are entered, not make _ illegal.
          Reverting.

          Show
          Adriaan Moors added a comment - I agree that was the wrong fix. We should've changed the name under which those hidden imports are entered, not make _ illegal. Reverting.
          Hide
          Adriaan Moors added a comment - - edited

          Reverted original fix because it caused the regression reported by Travis: https://github.com/scala/scala/pull/3261

          Let's try this again for 2.11 by changing the symbol entering logic for hidden imports.

          Show
          Adriaan Moors added a comment - - edited Reverted original fix because it caused the regression reported by Travis: https://github.com/scala/scala/pull/3261 Let's try this again for 2.11 by changing the symbol entering logic for hidden imports.
          Hide
          Adriaan Moors added a comment -

          Since 2.11.0-RC1 is one week away, pushing all non-blockers without PR to 2.11.1-RC1. Please undo the change if I missed work in progress.

          Show
          Adriaan Moors added a comment - Since 2.11.0-RC1 is one week away, pushing all non-blockers without PR to 2.11.1-RC1. Please undo the change if I missed work in progress.

            People

            • Assignee:
              Adriaan Moors
              Reporter:
              Jason Zaugg
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Development