File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,7 @@ class TyperState() {
119119 * which is not yet committed, or which does not have a parent.
120120 */
121121 def uncommittedAncestor : TyperState =
122- // TODO
123- if (isCommitted) previous.nn.uncommittedAncestor else this
122+ if (isCommitted && previous != null ) previous.uncheckedNN.uncommittedAncestor else this
124123
125124 /** Commit typer state so that its information is copied into current typer state
126125 * In addition (1) the owning state of undetermined or temporarily instantiated
Original file line number Diff line number Diff line change @@ -2878,6 +2878,7 @@ object Types {
28782878 }
28792879 }
28802880
2881+ // `refFn` can be null only if `computed` is true.
28812882 case class LazyRef (private var refFn : (Context => (Type | Null )) | Null ) extends UncachedProxyType with ValueType {
28822883 private var myRef : Type | Null = null
28832884 private var computed = false
Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ class PlainPrinter(_ctx: Context) extends Printer {
5050 tp match {
5151 case tp : ThisType if tp.cls.is(Package ) && ! tp.cls.isEffectiveRoot =>
5252 requiredPackage(tp.cls.fullName).termRef
53+ case tp : TypeRef =>
54+ val tp1 = tp.dealiasKeepAnnots
55+ if tp1 ne tp then homogenize(tp1) else tp
5356 case tp : TypeVar if tp.isInstantiated =>
5457 homogenize(tp.instanceOpt)
5558 case AndType (tp1, tp2) =>
@@ -60,6 +63,8 @@ class PlainPrinter(_ctx: Context) extends Printer {
6063 if ! ctx.mode.is(Mode .Type ) && annot.symbol == defn.UncheckedVarianceAnnot =>
6164 homogenize(parent)
6265 case tp : SkolemType =>
66+ // println(tp.info)
67+ // println(tp.info.widen)
6368 homogenize(tp.info)
6469 case tp : LazyRef =>
6570 homogenize(tp.ref)
Original file line number Diff line number Diff line change @@ -387,10 +387,10 @@ object ProtoTypes {
387387 case _ =>
388388 targ = typerFn(arg)
389389 if ctx.reporter.hasUnreportedErrors then
390- if hasInnerErrors(targ) then
390+ if hasInnerErrors(targ.nn ) then
391391 state.errorArgs += arg
392392 else
393- state.typedArg = state.typedArg.updated(arg, targ)
393+ state.typedArg = state.typedArg.updated(arg, targ.nn )
394394 state.errorArgs -= arg
395395 }
396396 targ.nn
You can’t perform that action at this time.
0 commit comments