Skip to content

Commit 96fe9b5

Browse files
committed
Make ordering of check deterministic
1 parent d8e887f commit 96fe9b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/transform/init/CycleChecker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class CycleChecker(cache: Cache) {
8484
private val proxyCache = mutable.Map.empty[Symbol, List[Dependency]]
8585

8686
val classesInCurrentRun = mutable.Set.empty[Symbol]
87-
val objectsInCurrentRun = mutable.Set.empty[Symbol]
87+
val objectsInCurrentRun = new mutable.ListBuffer[Symbol]
8888

8989
/** Checking state */
9090
case class State(visited: mutable.Set[Dependency], path: Vector[Symbol], trace: Vector[Dependency]) {

tests/init/neg/t9312.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ object DeadLockTest {
1515
def siblings = parent.children - this
1616
}
1717

18-
object Child1 extends Child // error
18+
object Child1 extends Child
1919
object Child2 extends Child
2020

2121
final val children = Set(Child1, Child2)

0 commit comments

Comments
 (0)