Skip to content

Commit 05a454a

Browse files
committed
run utility and then manually tweak Warning
1 parent b605c03 commit 05a454a

File tree

6 files changed

+11
-2
lines changed

6 files changed

+11
-2
lines changed

compiler/test-resources/repl/i4184

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ scala> object bar { class Foo }
55
scala> implicit def eqFoo: CanEqual[foo.Foo, foo.Foo] = CanEqual.derived
66
def eqFoo: CanEqual[foo.Foo, foo.Foo]
77
scala> object Bar { new foo.Foo == new bar.Foo }
8+
-- Error:
89
1 | object Bar { new foo.Foo == new bar.Foo }
910
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
1011
| Values of types foo.Foo and bar.Foo cannot be compared with == or !=

compiler/test-resources/repl/i4217

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
scala> def foo(x: Option[Int]) = x match { case None => }
2+
-- Warning:
23
1 | def foo(x: Option[Int]) = x match { case None => }
34
| ^
45
| match may not be exhaustive.

compiler/test-resources/repl/i5733

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
scala> abstract class F { def f(arg: Any): Unit; override def toString = "F" }
22
// defined class F
33
scala> val f: F = println
4+
-- Warning:
45
1 | val f: F = println
56
| ^^^^^^^
67
|method println is eta-expanded even though F does not have the @FunctionalInterface annotation.
7-
val f: F = F
8+
val f: F = F

compiler/test-resources/repl/i6474

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ val res0: (Any, Int) = (1,2)
99
scala> ((1, 2): Foo2.T[Int][Int]): Foo2.T[Any][Int]
1010
val res1: (Any, Int) = (1,2)
1111
scala> (1, 2): Foo3.T[Int][Int]
12+
-- Error:
1213
1 | (1, 2): Foo3.T[Int][Int]
1314
| ^^^^^^^^^^^^^^^^
1415
| Missing type parameter for Foo3.T[Int][Int]

compiler/test-resources/repl/importFromObj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@ scala> object o { val xs = List(1, 2, 3) }
55
// defined object o
66
scala> import o._
77
scala> buf += xs
8+
-- Error:
89
1 | buf += xs
910
| ^^
1011
| Found: (o.xs : List[Int])
1112
| Required: Int
1213
scala> buf ++= xs
1314
val res0: scala.collection.mutable.ListBuffer[Int] = ListBuffer(1, 2, 3)
1415
scala> import util.foobar
16+
-- Error:
1517
1 | import util.foobar
1618
| ^^^^^^
1719
| value foobar is not a member of util
1820
scala> import util.foobar.bar
21+
-- Error:
1922
1 | import util.foobar.bar
2023
| ^^^^^^^^^^^
2124
| value foobar is not a member of util

compiler/test-resources/repl/notFound

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
scala> Foo
2+
-- Error:
23
1 | Foo
34
| ^^^
45
| Not found: Foo
56
scala> Bar
7+
-- Error:
68
1 | Bar
79
| ^^^
8-
| Not found: Bar
10+
| Not found: Bar

0 commit comments

Comments
 (0)