summaryrefslogtreecommitdiff
path: root/test/files/run/t7801.check
Commit message (Collapse)AuthorAgeFilesLines
* SI-9206 Update REPL welcome messageSom Snytt2015-06-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Everyone knows that a `help` command will result in `more information`. This commit moves the version string to the second line and adds some verve to the welcome. If anyone can't live without the old banner, they are now able to configure it explicitly, so there is still no blood on our hands. ``` $ scala Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40). Type in expressions to have them evaluated. Type :help for more information. scala> :quit $ skala Welcome to Scala! version 2.11.7-20150623-155244-eab44dd092 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40). Type in expressions for evaluation. Or try :help. scala> :quit ``` REPL tests now lop off the actual length of the welcome header; or, if necessary, remove the version number from a header embedded in output.
* SI-4563 friendlier behavior for Ctrl+D in the REPLAntoine Gourlay2014-07-291-1/+1
| | | | | | | | | | | | | Closing the REPL with Ctrl+D does not issue a newline, so the user's prompt displays on the same line as the `scala>` prompt. This is bad. We now force a newline before closing the interpreter, and display `:quit` while we're at it so that people know how to exit the REPL (since `exit` doesn't exist anymore). The tricky part was to only add a newline when the console is interrupted, and *not* when it is closed by a command (like `:quit`), since commands are processed after their text (including newline) has been sent to the console.
* SI-7801 Fix a nightmarish bug in Symbols#adaptInfosJason Zaugg2013-09-041-0/+11
The compiler-in-residence has always been a sketchy affair; FSC and REPL offers a bounty of bugs that exploit the menagerie of time-travel mechanisms in play for symbols' metadata (type, flags, name and owner.) but are often cleverly masked by optimizations in the compiler based on reference equality. The latest: an innocuous change in Erasure: https://github.com/scala/scala/commit/d8b96bb8#commitcomment-3995163 means that some `ErasureMap`-s over `MethodType`-s are now true identities (as `UnitTpe` is always the same object, whereas `erasedTypeRef(UnitClass)` returns an different `TypeRef` each time.) This, in turn, enables `TypeMap#mapOver` to reuse the existing enclosing type, and so on. On such subtleties hinge further optimizations, such as whether or not a given phase's `InfoTransformer` needs to add an entry in a symbols type history. When the REPL (or FSC / Presentation Compiler) creates a new `Run`, `Symbol#rawInfo` tries to adapt the entries in the type history for the new run. For packages, this was taken to be a no-op; each entry is marked as being valid in the new run and no further action is taken. This logic lurks in `adaptInfos`. But, when the namer enters a new symbol in a package, it *mutates* the Scope of that package classes info `enteringTyper`. So the later entries in the type history *must* be invalidated and recomputed. We have two choices for a fix: 1) modify `Namers#enterInScope` to blow away the subsequent type history for the owning symbol after inserting the new member. Something like `owner.setInfo(owner.info)` would have the desired effect. 2) Change `adaptInfos` to be more conservative when it comes to package classes, and retain only the oldest entry in the type history. This commit goes for option 2.