summaryrefslogtreecommitdiff
path: root/test/files/run/t7747-repl.check
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2015-06-15 11:21:06 -0700
committerSom Snytt <som.snytt@gmail.com>2015-07-06 22:04:54 -0700
commitaa0f345de2955819e7048984a7e5fa0acb7e8bc2 (patch)
tree6d471a4c19baa068ba422a653b8131d56026dbac /test/files/run/t7747-repl.check
parent52fde52920d93325310e5544991feeea03e5c763 (diff)
downloadscala-aa0f345de2955819e7048984a7e5fa0acb7e8bc2.tar.gz
scala-aa0f345de2955819e7048984a7e5fa0acb7e8bc2.tar.bz2
scala-aa0f345de2955819e7048984a7e5fa0acb7e8bc2.zip
SI-1931 Hide Predef.any2stringadd in REPL
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.
Diffstat (limited to 'test/files/run/t7747-repl.check')
-rw-r--r--test/files/run/t7747-repl.check32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/files/run/t7747-repl.check b/test/files/run/t7747-repl.check
index f19c39e7e1..487daf4878 100644
--- a/test/files/run/t7747-repl.check
+++ b/test/files/run/t7747-repl.check
@@ -15,13 +15,13 @@ scala> val z = x * y
z: Int = 156
scala> 2 ; 3
-<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
2 ;;
^
res0: Int = 3
scala> { 2 ; 3 }
-<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:12: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
{ 2 ; 3 }
^
res1: Int = 3
@@ -30,16 +30,16 @@ scala> 5 ; 10 ; case object Cow ; 20 ; class Moo { override def toString = "Mooo
1 +
2 +
3 } ; bippy+88+11
-<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
5 ; 10 ; case object Cow ; 20 ; class Moo { override def toString = "Moooooo" } ; 30 ; def bippy = {
^
-<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
5 ; 10 ; case object Cow ; 20 ; class Moo { override def toString = "Moooooo" } ; 30 ; def bippy = {
^
-<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
5 ; 10 ; case object Cow ; 20 ; class Moo { override def toString = "Moooooo" } ; 30 ; def bippy = {
^
-<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
5 ; 10 ; case object Cow ; 20 ; class Moo { override def toString = "Moooooo" } ; 30 ; def bippy = {
^
defined object Cow
@@ -81,10 +81,10 @@ scala> ( (2 + 2 ) )
res10: Int = 4
scala> 5 ; ( (2 + 2 ) ) ; ((5))
-<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
5 ; ( (2 + 2 ) ) ;;
^
-<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
5 ; ( (2 + 2 ) ) ;;
^
res11: Int = 5
@@ -101,16 +101,16 @@ res14: String = 4423
scala>
scala> 55 ; ((2 + 2)) ; (1, 2, 3)
-<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
55 ; ((2 + 2)) ;;
^
-<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
55 ; ((2 + 2)) ;;
^
res15: (Int, Int, Int) = (1,2,3)
scala> 55 ; (x: Int) => x + 1 ; () => ((5))
-<console>:12: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:13: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
55 ; (x: Int) => x + 1 ;;
^
res16: () => Int = <function0>
@@ -121,7 +121,7 @@ scala> () => 5
res17: () => Int = <function0>
scala> 55 ; () => 5
-<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
55 ;;
^
res18: () => Int = <function0>
@@ -209,13 +209,13 @@ Forgetting all expression results and named terms: $intp, BippyBungus, Bovine, C
Forgetting defined types: BippyBungus, Moo, Ruminant
scala> x1 + x2 + x3
-<console>:11: error: not found: value x1
+<console>:12: error: not found: value x1
x1 + x2 + x3
^
-<console>:11: error: not found: value x2
+<console>:12: error: not found: value x2
x1 + x2 + x3
^
-<console>:11: error: not found: value x3
+<console>:12: error: not found: value x3
x1 + x2 + x3
^
@@ -223,7 +223,7 @@ scala> val x1 = 4
x1: Int = 4
scala> new BippyBungus
-<console>:11: error: not found: type BippyBungus
+<console>:12: error: not found: type BippyBungus
new BippyBungus
^