summaryrefslogtreecommitdiff
path: root/test/files/jvm/interpreter.check
Commit message (Collapse)AuthorAgeFilesLines
* Revert "SI-10133 Require escaped single quote char lit"Adriaan Moors2017-02-211-4/+4
|
* SI-10120 ReplReporter handles message indentSom Snytt2017-01-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of indenting source code to make messages align on output, let the reporter add indentation, only if the source is the console (and not a pastie or a loaded file). Previously, syntax errors were not indented. ``` $ skala Welcome to Scala 2.12.2-20170108-010722-939abf1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111). Type in expressions for evaluation. Or try :help. scala> 'abc' <console>:1: error: unclosed character literal (or use " for string literal "abc") 'abc' ^ scala> :quit $ scala Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111). Type in expressions for evaluation. Or try :help. scala> 'abc' <console>:1: error: unclosed character literal 'abc' ^ ```
* SI-8829 Let reporter customize retry messageSom Snytt2016-07-091-2/+2
| | | | | | | | "Re-run with -deprecation" is not always appropriate. REPL gets to customize the message. The API includes the setting and its name, because reflect Settings do not have names. (!)
* SI-9740 Repl import fix -Yrepl-class-basedSom Snytt2016-05-021-1/+1
| | | | | | | Under `-Yrepl-class-based`, templating must follow the same scoping as under traditional object-based. The new test shows a typical case where two values of the same simple name must be imported in different scopes.
* SI-1931 Hide Predef.any2stringadd in REPLSom Snytt2015-07-061-3/+3
| | | | | | | | | | | | | | User imports that reference Predef are relocated to the top of the wrapping template so that they can hide implicits defined in Predef. Only one import from Predef is retained for special treatment. This is simple and sane. The test shows that `import Predef._` restores Predef implicits even if a user-defined term would normally be in scope. A smart `:import` command to turn off or quarantine imports explicitly would allow fine-grained control.
* 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-9206 Fix REPL code indentationSom Snytt2015-06-191-9/+9
| | | | | | | | | | To make code in error messages line up with the original line of code, templated code is indented by the width of the prompt. Use the raw prompt (without ANSI escapes or newlines) to determine the indentation. Also, indent only once per line.
* 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-8185 Correct grammar for single-warning compilation runFrançois Garillot2014-05-141-2/+2
|
* SI-8035 Deprecate automatic () insertion in argument listsSimon Ochsenreither2014-01-091-1/+1
| | | | | | | | | | | | | This promotes the () insertion warning from -Ywarn-adapted-args to a deprecation warning. -Xfuture tunrs it into a compiler error. Auto tupling remains unchanged for now. The tests have been fixed the following way: - Warnings caused by general sloppiness (Try(), Future(), ...) have been fixed. - Warnings which raise interesting questions (x == (), ...) received an updated checkfile for now.
* Cull extraneous whitespace.Paul Phillips2013-09-181-6/+2
| | | | | | | | | | | | | | | | | | | | | One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
* Merge remote-tracking branch 'origin/2.10.x' into merge-210Paul Phillips2013-02-101-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: Fix for paramaccessor alias regression. Expanded bytecode testing code. SI-5675 Discard duplicate feature warnings at a position accommodates pull request feedback term and type reftrees are now reified uniformly SI-6591 Reify and path-dependent types SI-7096 SubstSymMap copies trees before modifying their symbols SI-6961 no structural sharing in list serialization SI-6187 Make partial functions re-typable [backport] SI-6478 Fixing JavaTokenParser ident SI-7100 Fixed infinite recursion in duplicators SI-6146 More accurate prefixes for sealed subtypes. SI-5082 Cycle avoidance between case companions SI-6113 typeOf now works for type lambdas SI-5824 Fix crashes in reify with _* SI-7026: parseTree should never return a typed one SI-7070 Turn restriction on companions in pkg objs into warning Conflicts: src/compiler/scala/reflect/reify/codegen/GenSymbols.scala src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/compiler/scala/tools/reflect/ToolBoxFactory.scala src/library/scala/collection/immutable/List.scala src/reflect/scala/reflect/internal/TreeInfo.scala src/reflect/scala/reflect/internal/Types.scala src/reflect/scala/reflect/internal/settings/MutableSettings.scala src/reflect/scala/reflect/runtime/Settings.scala test/files/buildmanager/t2650_1/t2650_1.check test/files/buildmanager/t2657/t2657.check test/files/neg/t3234.check test/files/run/idempotency-this.check test/files/run/macro-typecheck-macrosdisabled2.check test/files/run/showraw_tree.check test/files/run/showraw_tree_ids.check test/files/run/showraw_tree_kinds.check test/files/run/showraw_tree_types_ids.check test/files/run/showraw_tree_types_typed.check test/files/run/showraw_tree_types_untyped.check test/files/run/showraw_tree_ultimate.check test/files/run/t2886.check test/files/run/t5225_2.check test/files/run/t5374.check test/files/run/t5374.scala test/files/run/t6329_repl.check test/files/run/toolbox_typecheck_macrosdisabled2.check
| * SI-5675 Discard duplicate feature warnings at a positionJason Zaugg2013-02-081-2/+2
| | | | | | | | | | | | | | | | | | | | When -feature has not been enabled, we were double counting identical feature warnings that were emitted at the same position. Normal error reporting only reports the first time a warning appears at a position; feature warning counter incrementing should behave the same way. @hubertp: Fixed .check files that were broken in the original commit.
* | Removed old pattern matcher.Paul Phillips2012-12-261-4/+2
|/
* Restored :warnings to working order.Paul Phillips2012-08-061-371/+370
| | | | | | | | | | | | | | | | | | | | | | | | | | | As seen here. scala> class A { @deprecated("foo") def a = 1 } warning: there were 1 deprecation warnings; re-run with -deprecation for details defined class A scala> :warnings <console>:7: warning: @deprecated now takes two arguments; see the scaladoc. class A { @deprecated("foo") def a = 1 } ^ scala> val x = 5 toString warning: there were 1 feature warnings; re-run with -feature for details x: String = 5 scala> :warnings <console>:7: warning: postfix operator toString should be enabled by making the implicit value language.postfixOps visible. This can be achieved by adding the import clause 'import language.postfixOps' or by setting the compiler option -language:postfixOps. See the Scala docs for value scala.language.postfixOps for a discussion why the feature should be explicitly enabled. val x = 5 toString ^
* fixes testsEugene Burmako2012-04-171-3/+2
|
* adds erasures to concrete type tagsEugene Burmako2012-04-171-371/+372
|
* New facility: TypeDestructurers.Paul Phillips2012-04-161-3/+2
| | | | | | Would prefer to bake a little longer, but, scala days. More elaboration to come.
* Fixed tests to account for SIP 18Martin Odersky2012-04-131-369/+372
|
* Next generation of macrosEugene Burmako2012-04-121-369/+369
| | | | | | | | | | | | | | | | | | | | | | Implements SIP 16: Self-cleaning macros: http://bit.ly/wjjXTZ Features: * Macro defs * Reification * Type tags * Manifests aliased to type tags * Extended reflection API * Several hundred tests * 1111 changed files Not yet implemented: * Reification of refined types * Expr.value splicing * Named and default macro expansions * Intricacies of interaction between macros and implicits * Emission of debug information for macros (compliant with JSR-45) Dedicated to Yuri Alekseyevich Gagarin
* SI-1118 WIPAlex Cruise2012-03-151-1/+1
|
* More repl work.Paul Phillips2011-11-041-1/+1
| | | | | | | | | Hardened the repl against a bunch of erroneous conditions. Added a :reset command which causes the repl to forget everything you have told it. Added classloader tracing when repl tracing is enabled. :reset is not that useful in its current form but it's the precursor to something more interesting. No review.
* Begone t1737...Hubert Plociniczak2011-11-021-3/+3
|
* Added *.log and build/ to gitignore so partest/...Josh Suereth2011-11-231-3/+3
| | | | | | | Added *.log and build/ to gitignore so partest/ant artifacts don't show up in our commit messages. Also fixed whitespace issues arising from the filter-branch history rewrite for git move.
* Selective dealiasing when printing errors.Paul Phillips2011-10-031-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Important note for busy commit log skimmers *** Symbol method "fullName" has been trying to serve the dual role of "how to print a symbol" and "how to find a class file." It cannot serve both these roles simultaneously, primarily because of package objects but other little things as well. Since in the majority of situations we want the one which corresponds to the idealized scala world, not the grubby bytecode, I went with that for fullName. When you require the path to a class (e.g. you are calling Class.forName) you should use javaClassName. package foo { package object bar { class Bippy } } If sym is Bippy's symbol, then sym.fullName == foo.bar.Bippy sym.javaClassName == foo.bar.package.Bippy *** End important note *** There are many situations where we (until now) forewent revealing everything we knew about a type mismatch. For instance, this isn't very helpful of scalac (at least in those more common cases where you didn't define type X on the previous repl line.) scala> type X = Int defined type alias X scala> def f(x: X): Byte = x <console>:8: error: type mismatch; found : X required: Byte def f(x: X): Byte = x ^ Now it says: found : X (which expands to) Int required: Byte def f(x: X): Byte = x ^ In addition I rearchitected a number of methods involving: - finding a symbol's owner - calculating a symbol's name - determining whether to print a prefix No review.
* The eagerly awaited companion commit to r23622,...Paul Phillips2011-06-011-2/+2
| | | | | | | | | | | | | | | The eagerly awaited companion commit to r23622, the surprise hit of last winter. Singletons now have the singleton type inferred in monomorphic contexts as well. In english: scala> object X defined module X scala> def f = X f: X.type Wait, that's not english. English review by moors.
* Fixing an interpreter output regression and upd...Paul Phillips2011-05-291-1/+1
| | | | | | Fixing an interpreter output regression and updated repl debugging and tracing code. No review.
* Enhancing the repl-testing code by turning it i...Paul Phillips2011-04-051-100/+239
| | | | | | | | | | Enhancing the repl-testing code by turning it into a transcript producing machine. "Here's some code." "Here's a transcript!" "Good day to you, sir!" "No, good day to YOU!" These changes are awesome. Look at the checkfile diffs for god's sake, they'll make you weep with joy. No review.
* I keep seeing huge simplifications available in...Paul Phillips2011-02-011-3/+3
| | | | | | | | | I keep seeing huge simplifications available in the repl. Lot of interesting features have come to town since it was first conceived. In this commit I give the internal names some tips on aesthetics, and put each line in its own package like civilized artificial constructs. No review.
* The empty string commit made me hungry to actua...Paul Phillips2011-01-211-2/+2
| | | | | | | The empty string commit made me hungry to actually know what's in stuff. Now it prints quotes around a string if it's empty or if either the first or last character is whitespace. No review.
* Two hashcode-related failing tests fixed.Aleksandar Pokopec2010-10-281-1/+1
| | | | | No review.
* Some cleanups in the compiler source.Paul Phillips2010-10-111-1/+1
| | | | | | | eliminated the import of ambiguously named classes from e.g. collection.mutable, obeyed a todo in the parser regarding dropping lbracket from statement starting tokens. No review.
* Fix for the partest task to fail the build when...Paul Phillips2010-04-061-1/+1
| | | | | | | | Fix for the partest task to fail the build when a test fails, and fixes for 2/3 of the quietly failing tests. I'm not quite sure what to do about the view ones, it doesn't look like a simple rename is going to cut it, so: review by odersky.
* Tweaking the sealed logic in light of #3097.Paul Phillips2010-02-251-1/+1
| | | | | | | Reorganizes children a little so they always come back sorted the same way the pickler does. Taking advantage of -Yfatal-warnings in the test case. Review by community.
* Some repl cleanups and debugging conveniences.Paul Phillips2010-02-211-3/+3
|
* Some minor polishing to the previous repl compl...Paul Phillips2010-01-241-1/+1
| | | | | | Some minor polishing to the previous repl completion patch, plus a few new features and improvements.
* Don't insert whitespace on multiline strings an...Paul Phillips2010-01-171-4/+4
| | | | | | Don't insert whitespace on multiline strings and xml literals. Closes #2115. No review.
* Fix and test cases for ticket #443.Paul Phillips2009-10-171-0/+1
| | | | | | | flags on AnyVal from FINAL|SEALED to ABSTRACT|SEALED. This appears correct and without ill effect, but if anyone spots new anyval oddness you know where to look.
* reverted immutable.Vector because it gave rando...Martin Odersky2009-10-121-2/+18
| | | | | | reverted immutable.Vector because it gave random build errors on my machine. Fixed various tickets, updated test and check files.
* Named and default argumentsLukas Rytz2009-05-301-4/+4
| | | | | | | - MethodTypes now have (params: List[Symbol]) - "copy"-methods for case classes - the "copy" object in the compiler is now called "treeCopy"
* A big yet interim patch emerging from my attemp...Paul Phillips2009-05-261-2/+2
| | | | | | | | | | | | | | | | | | A big yet interim patch emerging from my attempts to centralize common classloader-related code. As it turns out, not that much of the patch is directly associated with that. Most of it is cleanup in the neighborhoods I was visiting, but there are a few new library files about which I'm open to feedback: scala/util/control/Exception - lots of exception handling code. scala/net/Utility - what would be the first file in scala.net.*, more code to follow if that sounds like a good package idea. scala/util/ScalaClassLoader - mostly convenience methods right now, more sophistication to come Also, this adds a :jar command to the repl which adds a jar to your classpath and replays the session.
* Restored xml test cases to unminimized tagsPaul Phillips2009-05-151-1/+1
|
* 1.4-related cleanup and reorganization.Antonio Cunei2009-05-151-0/+218
Removed a bunch of now useless 1.4 code, merged back jvm5-specific partest tests into the general jvm tests, documentation updates.