File tree 3 files changed +6
-7
lines changed
compiler/src/dotty/tools/dotc
3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ object Config {
148
148
final val showCompletions = false
149
149
150
150
/** If set, enables tracing */
151
- final val tracingEnabled = true
151
+ final val tracingEnabled = false
152
152
153
153
/** Initial capacity of uniques HashMap.
154
154
* Note: This MUST BE a power of two to work with util.HashSet
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import printing.Texts._
12
12
import config .Config
13
13
import collection .mutable
14
14
import java .lang .ref .WeakReference
15
- import Decorators ._
16
15
17
16
class TyperState (previous : TyperState /* | Null */ ) extends DotClass with Showable {
18
17
@@ -30,11 +29,11 @@ class TyperState(previous: TyperState /* | Null */) extends DotClass with Showab
30
29
31
30
def constraint = myConstraint
32
31
def constraint_= (c : Constraint )(implicit ctx : Context ) = {
33
- // println(i"assigning $c to $hashesStr")
34
32
if (Config .debugCheckConstraintsClosed && isGlobalCommittable) c.checkClosed()
35
33
myConstraint = c
36
34
}
37
35
36
+ /** Reset constraint to `c` and mark current constraint as retracted if it differs from `c` */
38
37
def resetConstraintTo (c : Constraint ) = {
39
38
if (c `ne` myConstraint) myConstraint.markRetracted()
40
39
myConstraint = c
Original file line number Diff line number Diff line change @@ -195,10 +195,9 @@ object ProtoTypes {
195
195
196
196
override def notApplied = WildcardType
197
197
198
- /** Forget the types of any arguments that have been typed producing a constraint that is
199
- * either
200
- * - in a typer state that is not yet committed into the one of the current context `ctx`, or
201
- * - has been retracted from its typestate because oif a failed operation.
198
+ /** Forget the types of any arguments that have been typed producing a constraint
199
+ * - that is in a typer state that is not yet committed into the one of the current context `ctx`,
200
+ * - or that has been retracted from its typestate because oif a failed operation.
202
201
* This is necessary to avoid "orphan" TypeParamRefs that are referred to from
203
202
* type variables in the typed arguments, but that are not registered in the
204
203
* current constraint. Test cases are pos/t1756.scala and pos/i3538.scala.
@@ -208,6 +207,7 @@ object ProtoTypes {
208
207
evalState foreachBinding { (arg, tstateConstr) =>
209
208
if ((tstateConstr._1.uncommittedAncestor.constraint `ne` ctx.typerState.constraint) ||
210
209
tstateConstr._2.isRetracted) {
210
+ typr.println(i " need to invalidate $arg / ${myTypedArg(arg)}, ${tstateConstr._2}, current = ${ctx.typerState.constraint}" )
211
211
myTypedArg = myTypedArg.remove(arg)
212
212
evalState = evalState.remove(arg)
213
213
}
You can’t perform that action at this time.
0 commit comments