Skip to content

Commit 7c57166

Browse files
committed
chore: Fix issues with tests
1 parent b003ed0 commit 7c57166

File tree

3 files changed

+135
-132
lines changed

3 files changed

+135
-132
lines changed

compiler/test/dotty/tools/repl/ReplCompilerTests.scala

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,6 @@ class ReplCompilerTests extends ReplTest:
372372
assertTrue(last, last.startsWith("val res0: tpolecat.type = null"))
373373
assertTrue(last, last.endsWith("""// result of "res0.toString" is null"""))
374374

375-
@Test def `i21431 filter out best effort options`: Unit =
376-
initially:
377-
run(":settings -Ybest-effort -Ywith-best-effort-tasty")
378-
.andThen:
379-
run("0") // check for crash
380-
val last = lines()
381-
assertTrue(last(0), last(0) == ("Options incompatible with repl will be ignored: -Ybest-effort, -Ywith-best-effort-tasty"))
382-
assertTrue(last(1), last(1) == ("val res0: Int = 0"))
383-
384375
@Test def `i9879`: Unit = initially:
385376
run {
386377
"""|opaque type A = Int; def getA: A = 0

tests/printing/lambdas.check

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,21 @@ package <empty> {
55
val f1: Int => Int = (x: Int) => x.+(1)
66
val f2: (Int, Int) => Int = (x: Int, y: Int) => x.+(y)
77
val f3: Int => Int => Int = (x: Int) => (y: Int) => x.+(y)
8-
val f4: [T] => (x: Int) => Int = [T >: Nothing <: Any] => (x: Int) => x.+(1)
9-
val f5: [T] => (x: Int) => Int => Int = [T >: Nothing <: Any] => (x: Int)
10-
=> (y: Int) => x.+(y)
8+
val f4: [T] => (x: Int) => Int =
9+
{
10+
final class $anon() extends Object(), PolyFunction {
11+
def apply[T >: Nothing <: Any](x: Int): Int = x.+(1)
12+
}
13+
new $anon():([T] => (x: Int) => Int)
14+
}
15+
val f5: [T] => (x: Int) => Int => Int =
16+
{
17+
final class $anon() extends Object(), PolyFunction {
18+
def apply[T >: Nothing <: Any](x: Int): Int => Int = (y: Int) =>
19+
x.+(y)
20+
}
21+
new $anon():([T] => (x: Int) => Int => Int)
22+
}
1123
val f6: Int => Int = (x: Int) =>
1224
{
1325
val x2: Int = x.+(1)

0 commit comments

Comments
 (0)