File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ object Config {
148148 final val showCompletions = false
149149
150150 /** If set, enables tracing */
151- final val tracingEnabled = true
151+ final val tracingEnabled = false
152152
153153 /** Initial capacity of uniques HashMap.
154154 * 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._
1212import config .Config
1313import collection .mutable
1414import java .lang .ref .WeakReference
15- import Decorators ._
1615
1716class TyperState (previous : TyperState /* | Null */ ) extends DotClass with Showable {
1817
@@ -30,11 +29,11 @@ class TyperState(previous: TyperState /* | Null */) extends DotClass with Showab
3029
3130 def constraint = myConstraint
3231 def constraint_= (c : Constraint )(implicit ctx : Context ) = {
33- // println(i"assigning $c to $hashesStr")
3432 if (Config .debugCheckConstraintsClosed && isGlobalCommittable) c.checkClosed()
3533 myConstraint = c
3634 }
3735
36+ /** Reset constraint to `c` and mark current constraint as retracted if it differs from `c` */
3837 def resetConstraintTo (c : Constraint ) = {
3938 if (c `ne` myConstraint) myConstraint.markRetracted()
4039 myConstraint = c
Original file line number Diff line number Diff line change @@ -195,10 +195,9 @@ object ProtoTypes {
195195
196196 override def notApplied = WildcardType
197197
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.
202201 * This is necessary to avoid "orphan" TypeParamRefs that are referred to from
203202 * type variables in the typed arguments, but that are not registered in the
204203 * current constraint. Test cases are pos/t1756.scala and pos/i3538.scala.
@@ -208,6 +207,7 @@ object ProtoTypes {
208207 evalState foreachBinding { (arg, tstateConstr) =>
209208 if ((tstateConstr._1.uncommittedAncestor.constraint `ne` ctx.typerState.constraint) ||
210209 tstateConstr._2.isRetracted) {
210+ typr.println(i " need to invalidate $arg / ${myTypedArg(arg)}, ${tstateConstr._2}, current = ${ctx.typerState.constraint}" )
211211 myTypedArg = myTypedArg.remove(arg)
212212 evalState = evalState.remove(arg)
213213 }
You can’t perform that action at this time.
0 commit comments