Skip to content

Commit 7fd8b1e

Browse files
committed
Add Id's to types.
Helps to track where erroneous type was created.
1 parent 34fa82c commit 7fd8b1e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/dotty/tools/dotc/core/Types.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ object Types {
3535

3636
private var recCount = 0 // used temporarily for debugging. TODO: remove
3737

38+
private var nextId = 0
39+
3840
/** The class of types.
3941
* The principal subclasses and sub-objects are as follows:
4042
*
@@ -70,6 +72,13 @@ object Types {
7072

7173
// ----- Tests -----------------------------------------------------
7274

75+
val uniqId = {
76+
nextId = nextId + 1
77+
// if(nextId == 19555)
78+
// println("foo")
79+
nextId
80+
}
81+
7382
/** Is this type different from NoType? */
7483
def exists: Boolean = true
7584

0 commit comments

Comments
 (0)