File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ object TyperState {
1717 @ sharable private var nextId : Int = 0
1818}
1919
20- class TyperState (previous : TyperState /* | Null */ ) {
20+ class TyperState (private val previous : TyperState /* | Null */ ) {
2121
2222 Stats .record(" typerState" )
2323
@@ -178,7 +178,12 @@ class TyperState(previous: TyperState /* | Null */) {
178178 constraint = constraint.remove(poly)
179179 }
180180
181- override def toString : String = s " TS[ $id] "
181+ override def toString : String = {
182+ def ids (state : TyperState ): List [String ] =
183+ s " ${state.id}${if (state.isCommittable) " " else " X" }" ::
184+ (if (state.previous == null ) Nil else ids(state.previous))
185+ s " TS[ ${ids(this ).mkString(" , " )}] "
186+ }
182187
183188 def stateChainStr : String = s " $this${if (previous == null ) " " else previous.stateChainStr}"
184189}
You can’t perform that action at this time.
0 commit comments