Skip to content

Commit f1b836e

Browse files
committed
Make i23882 test output stable
Sort declared methods by name, since their original order can vary.
1 parent 37739b3 commit f1b836e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/run/i23882.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
public void Foo.foo(java.lang.Object)
2-
public void Foo.foo(scala.Equals)
31
public void Foo.bar(Bar)
42
public void Foo.bar2(Bar)
53
public void Foo.bar3(Bar)
64
public void Foo.bar4(Bar)
5+
public void Foo.foo(java.lang.Object)
6+
public void Foo.foo(scala.Equals)

tests/run/i23882.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import scala.collection.*
44
import scala.caps.Pure
5+
import java.util.Arrays
56

67
trait Bar
78

@@ -14,5 +15,5 @@ class Foo:
1415
def bar4[T <: Pure](x: T & Bar): Unit = ??? // erases to Bar
1516

1617
@main def Test =
17-
for mtd <- classOf[Foo].getDeclaredMethods do
18+
for mtd <- classOf[Foo].getDeclaredMethods.sortBy(_.toString) do
1819
println(mtd)

0 commit comments

Comments
 (0)