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

REPL gives error after an import with repeating name

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.0-1, Scala 2.9.1
    • Fix Version/s: Scala 2.10.0-M3, Scala 2.10.0
    • Component/s: Repl / Interpreter
    • Labels:
      None
    • Environment:

      Windows 7 Pro 64 bit with 64 bit JDK

      Description

      Following code causes it to give error. Not sure if this is a bug or a feature

      scala> object x { def x={} }
      defined module x
      
      scala> import x._
      import x._
      
      scala> exit
      <console>:7: error: not found: value x
      import x._
             ^
      
      scala> 1
      <console>:7: error: not found: value x
      import x._
             ^
      

        Issue Links

          Activity

          Hide
          Daniel Sobral added a comment -

          Note that the proper way to exit REPL is :quit or :q. Usually, exit will work, though I have noticed it doesn't when REPL was started from SBT.

          I can reproduce the error, at any rate, also on Windows (Vista 64), with a somewhat old version of trunk.

          Show
          Daniel Sobral added a comment - Note that the proper way to exit REPL is :quit or :q . Usually, exit will work, though I have noticed it doesn't when REPL was started from SBT. I can reproduce the error, at any rate, also on Windows (Vista 64), with a somewhat old version of trunk.
          Hide
          Paul Phillips added a comment -

          03e3a40951 . I'm closing this but I'm aware that you can't outrun the ambiguity; the repl namespace management will be revamped.

          Show
          Paul Phillips added a comment - 03e3a40951 . I'm closing this but I'm aware that you can't outrun the ambiguity; the repl namespace management will be revamped.

            People

            • Assignee:
              Paul Phillips
              Reporter:
              Amitabh
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development