diff options
author | Som Snytt <som.snytt@gmail.com> | 2015-06-15 11:21:06 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2015-07-06 22:04:54 -0700 |
commit | aa0f345de2955819e7048984a7e5fa0acb7e8bc2 (patch) | |
tree | 6d471a4c19baa068ba422a653b8131d56026dbac /test/files/run/repl-parens.check | |
parent | 52fde52920d93325310e5544991feeea03e5c763 (diff) | |
download | scala-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/repl-parens.check')
-rw-r--r-- | test/files/run/repl-parens.check | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/files/run/repl-parens.check b/test/files/run/repl-parens.check index 35853f10da..6516f4ea90 100644 --- a/test/files/run/repl-parens.check +++ b/test/files/run/repl-parens.check @@ -18,10 +18,10 @@ scala> ( (2 + 2 ) ) res5: 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 ) ) ;; ^ res6: Int = 5 @@ -38,16 +38,16 @@ res9: 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)) ;; ^ res10: (Int, Int, Int) = (1,2,3) scala> 55 ; (x: Int) => x + 1 ; () => ((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 ; (x: Int) => x + 1 ;; ^ res11: () => Int = <function0> @@ -58,7 +58,7 @@ scala> () => 5 res12: () => 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 ;; ^ res13: () => Int = <function0> |