summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/constrained-types.check8
-rw-r--r--test/files/run/kind-repl-command.check6
-rw-r--r--test/files/run/reify-repl-fail-gracefully.check6
-rw-r--r--test/files/run/reify_newimpl_22.check6
-rw-r--r--test/files/run/reify_newimpl_23.check2
-rw-r--r--test/files/run/reify_newimpl_25.check6
-rw-r--r--test/files/run/reify_newimpl_26.check2
-rw-r--r--test/files/run/repl-bare-expr.check36
-rw-r--r--test/files/run/repl-colon-type.check4
-rw-r--r--test/files/run/repl-parens.check36
-rw-r--r--test/files/run/repl-paste-2.check2
-rw-r--r--test/files/run/repl-reset.check24
-rw-r--r--test/files/run/repl-trim-stack-trace.scala6
-rw-r--r--test/files/run/t4542.check2
-rw-r--r--test/files/run/t4594-repl-settings.scala2
-rw-r--r--test/files/run/t5655.check12
-rw-r--r--test/files/run/t7319.check18
-rw-r--r--test/files/run/t7747-repl.check96
-rw-r--r--test/files/run/t9170.scala24
-rw-r--r--test/files/run/t9206.scala39
-rw-r--r--test/files/run/xMigration.check18
21 files changed, 197 insertions, 158 deletions
diff --git a/test/files/run/constrained-types.check b/test/files/run/constrained-types.check
index 89a08d5ccb..6dbf8088c9 100644
--- a/test/files/run/constrained-types.check
+++ b/test/files/run/constrained-types.check
@@ -135,16 +135,16 @@ y: String = hello
scala>
scala> val x = 3 : Int @Annot(e+f+g+h) // should have a graceful error message
-<console>:8: error: not found: value e
+<console>:11: error: not found: value e
val x = 3 : Int @Annot(e+f+g+h) // should have a graceful error message
^
-<console>:8: error: not found: value f
+<console>:11: error: not found: value f
val x = 3 : Int @Annot(e+f+g+h) // should have a graceful error message
^
-<console>:8: error: not found: value g
+<console>:11: error: not found: value g
val x = 3 : Int @Annot(e+f+g+h) // should have a graceful error message
^
-<console>:8: error: not found: value h
+<console>:11: error: not found: value h
val x = 3 : Int @Annot(e+f+g+h) // should have a graceful error message
^
diff --git a/test/files/run/kind-repl-command.check b/test/files/run/kind-repl-command.check
index 586b2710e1..1853213555 100644
--- a/test/files/run/kind-repl-command.check
+++ b/test/files/run/kind-repl-command.check
@@ -21,8 +21,8 @@ scala> :k new { def empty = false }
AnyRef{def empty: Boolean}'s kind is A
scala> :k Nonexisting
-<console>:8: error: not found: value Nonexisting
- Nonexisting
- ^
+<console>:11: error: not found: value Nonexisting
+ Nonexisting
+ ^
scala> :quit
diff --git a/test/files/run/reify-repl-fail-gracefully.check b/test/files/run/reify-repl-fail-gracefully.check
index c9e69744d6..eac4d25869 100644
--- a/test/files/run/reify-repl-fail-gracefully.check
+++ b/test/files/run/reify-repl-fail-gracefully.check
@@ -10,8 +10,8 @@ import scala.reflect.runtime.universe._
scala>
scala> reify
-<console>:12: error: too few argument lists for macro invocation
- reify
- ^
+<console>:15: error: too few argument lists for macro invocation
+ reify
+ ^
scala> :quit
diff --git a/test/files/run/reify_newimpl_22.check b/test/files/run/reify_newimpl_22.check
index 952f384a1c..24334df92c 100644
--- a/test/files/run/reify_newimpl_22.check
+++ b/test/files/run/reify_newimpl_22.check
@@ -17,9 +17,9 @@ scala> {
}
println(code.eval)
}
-<console>:15: free term: Ident(TermName("x")) defined by res0 in <console>:14:21
- val code = reify {
- ^
+<console>:18: free term: Ident(TermName("x")) defined by res0 in <console>:17:14
+ val code = reify {
+ ^
2
scala> :quit
diff --git a/test/files/run/reify_newimpl_23.check b/test/files/run/reify_newimpl_23.check
index b7e9bfdfbc..f8379958db 100644
--- a/test/files/run/reify_newimpl_23.check
+++ b/test/files/run/reify_newimpl_23.check
@@ -16,7 +16,7 @@ scala> def foo[T]{
}
println(code.eval)
}
-<console>:13: free type: Ident(TypeName("T")) defined by foo in <console>:12:16
+<console>:16: free type: Ident(TypeName("T")) defined by foo in <console>:15:16
val code = reify {
^
foo: [T]=> Unit
diff --git a/test/files/run/reify_newimpl_25.check b/test/files/run/reify_newimpl_25.check
index 4f36ba10ee..f9a5d7b578 100644
--- a/test/files/run/reify_newimpl_25.check
+++ b/test/files/run/reify_newimpl_25.check
@@ -7,9 +7,9 @@ scala> {
val tt = implicitly[TypeTag[x.type]]
println(tt)
}
-<console>:11: free term: Ident(TermName("x")) defined by res0 in <console>:10:21
- val tt = implicitly[TypeTag[x.type]]
- ^
+<console>:14: free term: Ident(TermName("x")) defined by res0 in <console>:13:14
+ val tt = implicitly[TypeTag[x.type]]
+ ^
TypeTag[x.type]
scala> :quit
diff --git a/test/files/run/reify_newimpl_26.check b/test/files/run/reify_newimpl_26.check
index 681b862795..bd77d3d707 100644
--- a/test/files/run/reify_newimpl_26.check
+++ b/test/files/run/reify_newimpl_26.check
@@ -6,7 +6,7 @@ scala> def foo[T]{
val tt = implicitly[WeakTypeTag[List[T]]]
println(tt)
}
-<console>:9: free type: Ident(TypeName("T")) defined by foo in <console>:7:16
+<console>:12: free type: Ident(TypeName("T")) defined by foo in <console>:10:16
val tt = implicitly[WeakTypeTag[List[T]]]
^
foo: [T]=> Unit
diff --git a/test/files/run/repl-bare-expr.check b/test/files/run/repl-bare-expr.check
index 07cf23412f..38ad7e818d 100644
--- a/test/files/run/repl-bare-expr.check
+++ b/test/files/run/repl-bare-expr.check
@@ -2,33 +2,33 @@ Type in expressions to have them evaluated.
Type :help for more information.
scala> 2 ; 3
-<console>:7: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 2 ;;
- ^
+<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 2 ;;
+ ^
res0: Int = 3
scala> { 2 ; 3 }
-<console>:8: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- { 2 ; 3 }
- ^
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ { 2 ; 3 }
+ ^
res1: Int = 3
scala> 5 ; 10 ; case object Cow ; 20 ; class Moo { override def toString = "Moooooo" } ; 30 ; def bippy = {
1 +
2 +
3 } ; bippy+88+11
-<console>:7: 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>:7: 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>:7: 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>:7: 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
+ 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
+ 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
+ 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
+ 5 ; 10 ; case object Cow ; 20 ; class Moo { override def toString = "Moooooo" } ; 30 ; def bippy = {
+ ^
defined object Cow
defined class Moo
bippy: Int
diff --git a/test/files/run/repl-colon-type.check b/test/files/run/repl-colon-type.check
index 9898027c1d..fa33af3beb 100644
--- a/test/files/run/repl-colon-type.check
+++ b/test/files/run/repl-colon-type.check
@@ -3,8 +3,8 @@ Type :help for more information.
scala> :type List[1, 2, 3]
<console>:1: error: identifier expected but integer literal found.
- List[1, 2, 3]
- ^
+List[1, 2, 3]
+ ^
scala> :type List(1, 2, 3)
List[Int]
diff --git a/test/files/run/repl-parens.check b/test/files/run/repl-parens.check
index 74d15ff93c..756a063b68 100644
--- a/test/files/run/repl-parens.check
+++ b/test/files/run/repl-parens.check
@@ -20,12 +20,12 @@ scala> ( (2 + 2 ) )
res5: Int = 4
scala> 5 ; ( (2 + 2 ) ) ; ((5))
-<console>:7: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 5 ; ( (2 + 2 ) ) ;;
- ^
-<console>:7: 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
+ 5 ; ( (2 + 2 ) ) ;;
+ ^
+<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 5 ; ( (2 + 2 ) ) ;;
+ ^
res6: Int = 5
scala> (((2 + 2)), ((2 + 2)))
@@ -40,18 +40,18 @@ res9: String = 4423
scala>
scala> 55 ; ((2 + 2)) ; (1, 2, 3)
-<console>:7: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 55 ; ((2 + 2)) ;;
- ^
-<console>:7: 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
+ 55 ; ((2 + 2)) ;;
+ ^
+<console>:10: 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>:7: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 55 ; (x: Int) => x + 1 ;;
- ^
+<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 55 ; (x: Int) => x + 1 ;;
+ ^
res11: () => Int = <function0>
scala>
@@ -60,9 +60,9 @@ scala> () => 5
res12: () => Int = <function0>
scala> 55 ; () => 5
-<console>:7: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 55 ;;
- ^
+<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 55 ;;
+ ^
res13: () => Int = <function0>
scala> () => { class X ; new X }
diff --git a/test/files/run/repl-paste-2.check b/test/files/run/repl-paste-2.check
index 6ea8e2f419..bc80615107 100644
--- a/test/files/run/repl-paste-2.check
+++ b/test/files/run/repl-paste-2.check
@@ -44,7 +44,7 @@ scala> res5 + res6
res1: Int = 690
scala> val x = dingus
-<console>:7: error: not found: value dingus
+<console>:10: error: not found: value dingus
val x = dingus
^
diff --git a/test/files/run/repl-reset.check b/test/files/run/repl-reset.check
index cd7893bbc3..a2d88fd445 100644
--- a/test/files/run/repl-reset.check
+++ b/test/files/run/repl-reset.check
@@ -30,23 +30,23 @@ Forgetting all expression results and named terms: $intp, BippyBungus, x1, x2, x
Forgetting defined types: BippyBungus
scala> x1 + x2 + x3
-<console>:8: error: not found: value x1
- x1 + x2 + x3
- ^
-<console>:8: error: not found: value x2
- x1 + x2 + x3
- ^
-<console>:8: error: not found: value x3
- x1 + x2 + x3
- ^
+<console>:11: error: not found: value x1
+ x1 + x2 + x3
+ ^
+<console>:11: error: not found: value x2
+ x1 + x2 + x3
+ ^
+<console>:11: error: not found: value x3
+ x1 + x2 + x3
+ ^
scala> val x1 = 4
x1: Int = 4
scala> new BippyBungus
-<console>:8: error: not found: type BippyBungus
- new BippyBungus
- ^
+<console>:11: error: not found: type BippyBungus
+ new BippyBungus
+ ^
scala> class BippyBungus() { def f = 5 }
defined class BippyBungus
diff --git a/test/files/run/repl-trim-stack-trace.scala b/test/files/run/repl-trim-stack-trace.scala
index a53ce3b3e4..b8c1668691 100644
--- a/test/files/run/repl-trim-stack-trace.scala
+++ b/test/files/run/repl-trim-stack-trace.scala
@@ -13,7 +13,7 @@ f: Nothing
scala> f
java.lang.Exception: Uh-oh
- at .f(<console>:7)
+ at .f(<console>:10)
... 69 elided
scala> def f = throw new Exception("")
@@ -21,7 +21,7 @@ f: Nothing
scala> f
java.lang.Exception:
- at .f(<console>:7)
+ at .f(<console>:10)
... 69 elided
scala> def f = throw new Exception
@@ -29,7 +29,7 @@ f: Nothing
scala> f
java.lang.Exception
- at .f(<console>:7)
+ at .f(<console>:10)
... 69 elided
scala> :quit"""
diff --git a/test/files/run/t4542.check b/test/files/run/t4542.check
index f7716dc2f0..f7aad3deb2 100644
--- a/test/files/run/t4542.check
+++ b/test/files/run/t4542.check
@@ -7,7 +7,7 @@ scala> @deprecated("foooo", "ReplTest version 1.0-FINAL") class Foo() {
defined class Foo
scala> val f = new Foo
-<console>:8: warning: class Foo is deprecated: foooo
+<console>:11: warning: class Foo is deprecated: foooo
val f = new Foo
^
f: Foo = Bippy
diff --git a/test/files/run/t4594-repl-settings.scala b/test/files/run/t4594-repl-settings.scala
index db5dc19866..1b883983cf 100644
--- a/test/files/run/t4594-repl-settings.scala
+++ b/test/files/run/t4594-repl-settings.scala
@@ -17,7 +17,7 @@ object Test extends SessionTest {
|scala> :settings -deprecation
|
|scala> def b = depp
- |<console>:8: warning: method depp is deprecated: Please don't do that.
+ |<console>:11: warning: method depp is deprecated: Please don't do that.
| def b = depp
| ^
|b: String
diff --git a/test/files/run/t5655.check b/test/files/run/t5655.check
index 4bbc54b641..e8375c3e90 100644
--- a/test/files/run/t5655.check
+++ b/test/files/run/t5655.check
@@ -8,19 +8,19 @@ scala> import x._
import x._
scala> x
-<console>:12: error: reference to x is ambiguous;
+<console>:15: error: reference to x is ambiguous;
it is imported twice in the same scope by
import x._
and import x
- x
- ^
+ x
+ ^
scala> x
-<console>:12: error: reference to x is ambiguous;
+<console>:15: error: reference to x is ambiguous;
it is imported twice in the same scope by
import x._
and import x
- x
- ^
+ x
+ ^
scala> :quit
diff --git a/test/files/run/t7319.check b/test/files/run/t7319.check
index e35cfc90c0..885136b432 100644
--- a/test/files/run/t7319.check
+++ b/test/files/run/t7319.check
@@ -17,25 +17,25 @@ warning: there was one feature warning; re-run with -feature for details
convert: [F[X <: F[X]]](builder: F[_ <: F[_]])Int
scala> convert(Some[Int](0))
-<console>:12: error: no type parameters for method convert: (builder: F[_ <: F[_]])Int exist so that it can be applied to arguments (Some[Int])
+<console>:15: error: no type parameters for method convert: (builder: F[_ <: F[_]])Int exist so that it can be applied to arguments (Some[Int])
--- because ---
argument expression's type is not compatible with formal parameter type;
found : Some[Int]
required: ?F[_$1] forSome { type _$1 <: ?F[_$2] forSome { type _$2 } }
- convert(Some[Int](0))
- ^
-<console>:12: error: type mismatch;
+ convert(Some[Int](0))
+ ^
+<console>:15: error: type mismatch;
found : Some[Int]
required: F[_ <: F[_]]
- convert(Some[Int](0))
- ^
+ convert(Some[Int](0))
+ ^
scala> Range(1,2).toArray: Seq[_]
-<console>:11: error: polymorphic expression cannot be instantiated to expected type;
+<console>:14: error: polymorphic expression cannot be instantiated to expected type;
found : [B >: Int]Array[B]
required: Seq[_]
- Range(1,2).toArray: Seq[_]
- ^
+ Range(1,2).toArray: Seq[_]
+ ^
scala> 0
res2: Int = 0
diff --git a/test/files/run/t7747-repl.check b/test/files/run/t7747-repl.check
index 5f436ba6b1..98e3d3b821 100644
--- a/test/files/run/t7747-repl.check
+++ b/test/files/run/t7747-repl.check
@@ -17,33 +17,33 @@ scala> val z = x * y
z: Int = 156
scala> 2 ; 3
-<console>:7: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 2 ;;
- ^
+<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 2 ;;
+ ^
res0: Int = 3
scala> { 2 ; 3 }
-<console>:8: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- { 2 ; 3 }
- ^
+<console>:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ { 2 ; 3 }
+ ^
res1: Int = 3
scala> 5 ; 10 ; case object Cow ; 20 ; class Moo { override def toString = "Moooooo" } ; 30 ; def bippy = {
1 +
2 +
3 } ; bippy+88+11
-<console>:7: 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>:7: 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>:7: 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>:7: 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
+ 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
+ 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
+ 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
+ 5 ; 10 ; case object Cow ; 20 ; class Moo { override def toString = "Moooooo" } ; 30 ; def bippy = {
+ ^
defined object Cow
defined class Moo
bippy: Int
@@ -83,12 +83,12 @@ scala> ( (2 + 2 ) )
res10: Int = 4
scala> 5 ; ( (2 + 2 ) ) ; ((5))
-<console>:7: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 5 ; ( (2 + 2 ) ) ;;
- ^
-<console>:7: 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
+ 5 ; ( (2 + 2 ) ) ;;
+ ^
+<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 5 ; ( (2 + 2 ) ) ;;
+ ^
res11: Int = 5
scala> (((2 + 2)), ((2 + 2)))
@@ -103,18 +103,18 @@ res14: String = 4423
scala>
scala> 55 ; ((2 + 2)) ; (1, 2, 3)
-<console>:7: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 55 ; ((2 + 2)) ;;
- ^
-<console>:7: 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
+ 55 ; ((2 + 2)) ;;
+ ^
+<console>:10: 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>:9: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 55 ; (x: Int) => x + 1 ;;
- ^
+<console>:12: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 55 ; (x: Int) => x + 1 ;;
+ ^
res16: () => Int = <function0>
scala>
@@ -123,9 +123,9 @@ scala> () => 5
res17: () => Int = <function0>
scala> 55 ; () => 5
-<console>:7: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 55 ;;
- ^
+<console>:10: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 55 ;;
+ ^
res18: () => Int = <function0>
scala> () => { class X ; new X }
@@ -211,23 +211,23 @@ Forgetting all expression results and named terms: $intp, BippyBungus, Bovine, C
Forgetting defined types: BippyBungus, Moo, Ruminant
scala> x1 + x2 + x3
-<console>:8: error: not found: value x1
- x1 + x2 + x3
- ^
-<console>:8: error: not found: value x2
- x1 + x2 + x3
- ^
-<console>:8: error: not found: value x3
- x1 + x2 + x3
- ^
+<console>:11: error: not found: value x1
+ x1 + x2 + x3
+ ^
+<console>:11: error: not found: value x2
+ x1 + x2 + x3
+ ^
+<console>:11: error: not found: value x3
+ x1 + x2 + x3
+ ^
scala> val x1 = 4
x1: Int = 4
scala> new BippyBungus
-<console>:8: error: not found: type BippyBungus
- new BippyBungus
- ^
+<console>:11: error: not found: type BippyBungus
+ new BippyBungus
+ ^
scala> class BippyBungus() { def f = 5 }
defined class BippyBungus
diff --git a/test/files/run/t9170.scala b/test/files/run/t9170.scala
index 25a0e84581..67a58d6803 100644
--- a/test/files/run/t9170.scala
+++ b/test/files/run/t9170.scala
@@ -10,17 +10,17 @@ object Test extends SessionTest {
Type :help for more information.
scala> object Y { def f[A](a: => A) = 1 ; def f[A](a: => Either[Exception, A]) = 2 }
-<console>:7: error: double definition:
-def f[A](a: => A): Int at line 7 and
-def f[A](a: => Either[Exception,A]): Int at line 7
+<console>:10: error: double definition:
+def f[A](a: => A): Int at line 10 and
+def f[A](a: => Either[Exception,A]): Int at line 10
have same type after erasure: (a: Function0)Int
object Y { def f[A](a: => A) = 1 ; def f[A](a: => Either[Exception, A]) = 2 }
^
scala> object Y { def f[A](a: => A) = 1 ; def f[A](a: => Either[Exception, A]) = 2 }
-<console>:7: error: double definition:
-def f[A](a: => A): Int at line 7 and
-def f[A](a: => Either[Exception,A]): Int at line 7
+<console>:10: error: double definition:
+def f[A](a: => A): Int at line 10 and
+def f[A](a: => Either[Exception,A]): Int at line 10
have same type after erasure: (a: Function0)Int
object Y { def f[A](a: => A) = 1 ; def f[A](a: => Either[Exception, A]) = 2 }
^
@@ -29,9 +29,9 @@ scala> object Y {
| def f[A](a: => A) = 1
| def f[A](a: => Either[Exception, A]) = 2
| }
-<console>:9: error: double definition:
-def f[A](a: => A): Int at line 8 and
-def f[A](a: => Either[Exception,A]): Int at line 9
+<console>:12: error: double definition:
+def f[A](a: => A): Int at line 11 and
+def f[A](a: => Either[Exception,A]): Int at line 12
have same type after erasure: (a: Function0)Int
def f[A](a: => Either[Exception, A]) = 2
^
@@ -46,9 +46,9 @@ object Y {
// Exiting paste mode, now interpreting.
-<console>:9: error: double definition:
-def f[A](a: => A): Int at line 8 and
-def f[A](a: => Either[Exception,A]): Int at line 9
+<console>:12: error: double definition:
+def f[A](a: => A): Int at line 11 and
+def f[A](a: => Either[Exception,A]): Int at line 12
have same type after erasure: (a: Function0)Int
def f[A](a: => Either[Exception, A]) = 2
^
diff --git a/test/files/run/t9206.scala b/test/files/run/t9206.scala
new file mode 100644
index 0000000000..2942d0f73e
--- /dev/null
+++ b/test/files/run/t9206.scala
@@ -0,0 +1,39 @@
+
+import scala.tools.partest.SessionTest
+
+object Test extends SessionTest {
+ //override def prompt = "XXX> "
+//Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40).
+ def session =
+ s"""|Type in expressions to have them evaluated.
+ |Type :help for more information.
+ |
+ |scala> val i: Int = "foo"
+ |<console>:10: error: type mismatch;
+ | found : String("foo")
+ | required: Int
+ | val i: Int = "foo"
+ | ^
+ |
+ |scala> { val j = 42 ; val i: Int = "foo" + j }
+ |<console>:11: error: type mismatch;
+ | found : String
+ | required: Int
+ | { val j = 42 ; val i: Int = "foo" + j }
+ | ^
+ |
+ |scala> :quit"""
+ /*
+ |XXX> XXX> def f = 42
+ |
+ |// Detected repl transcript paste: ctrl-D to finish.
+ |
+ |// Replaying 1 commands from transcript.
+ |
+ |XXX> def f = 42
+ |f: Int
+ |
+ |XXX> :quit"""
+ */
+
+}
diff --git a/test/files/run/xMigration.check b/test/files/run/xMigration.check
index 378f7bb6c3..304132a848 100644
--- a/test/files/run/xMigration.check
+++ b/test/files/run/xMigration.check
@@ -12,10 +12,10 @@ res1: Iterable[String] = MapLike(eis)
scala> :setting -Xmigration:any
scala> Map(1 -> "eis").values // warn
-<console>:8: warning: method values in trait MapLike has changed semantics in version 2.8.0:
+<console>:11: warning: method values in trait MapLike has changed semantics in version 2.8.0:
`values` returns `Iterable[B]` rather than `Iterator[B]`.
- Map(1 -> "eis").values // warn
- ^
+ Map(1 -> "eis").values // warn
+ ^
res2: Iterable[String] = MapLike(eis)
scala> :setting -Xmigration:2.8
@@ -26,10 +26,10 @@ res3: Iterable[String] = MapLike(eis)
scala> :setting -Xmigration:2.7
scala> Map(1 -> "eis").values // warn
-<console>:8: warning: method values in trait MapLike has changed semantics in version 2.8.0:
+<console>:11: warning: method values in trait MapLike has changed semantics in version 2.8.0:
`values` returns `Iterable[B]` rather than `Iterator[B]`.
- Map(1 -> "eis").values // warn
- ^
+ Map(1 -> "eis").values // warn
+ ^
res4: Iterable[String] = MapLike(eis)
scala> :setting -Xmigration:2.11
@@ -40,10 +40,10 @@ res5: Iterable[String] = MapLike(eis)
scala> :setting -Xmigration // same as :any
scala> Map(1 -> "eis").values // warn
-<console>:8: warning: method values in trait MapLike has changed semantics in version 2.8.0:
+<console>:11: warning: method values in trait MapLike has changed semantics in version 2.8.0:
`values` returns `Iterable[B]` rather than `Iterator[B]`.
- Map(1 -> "eis").values // warn
- ^
+ Map(1 -> "eis").values // warn
+ ^
res6: Iterable[String] = MapLike(eis)
scala> :quit