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 {
17
17
@ sharable private var nextId : Int = 0
18
18
}
19
19
20
- class TyperState (previous : TyperState /* | Null */ ) {
20
+ class TyperState (private val previous : TyperState /* | Null */ ) {
21
21
22
22
Stats .record(" typerState" )
23
23
@@ -178,7 +178,12 @@ class TyperState(previous: TyperState /* | Null */) {
178
178
constraint = constraint.remove(poly)
179
179
}
180
180
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
+ }
182
187
183
188
def stateChainStr : String = s " $this${if (previous == null ) " " else previous.stateChainStr}"
184
189
}
You can’t perform that action at this time.
0 commit comments