File tree 4 files changed +9
-4
lines changed
compiler/src/dotty/tools/dotc
4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,7 @@ class TyperState() {
119
119
* which is not yet committed, or which does not have a parent.
120
120
*/
121
121
def uncommittedAncestor : TyperState =
122
- // TODO
123
- if (isCommitted) previous.nn.uncommittedAncestor else this
122
+ if (isCommitted && previous != null ) previous.uncheckedNN.uncommittedAncestor else this
124
123
125
124
/** Commit typer state so that its information is copied into current typer state
126
125
* 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 {
2878
2878
}
2879
2879
}
2880
2880
2881
+ // `refFn` can be null only if `computed` is true.
2881
2882
case class LazyRef (private var refFn : (Context => (Type | Null )) | Null ) extends UncachedProxyType with ValueType {
2882
2883
private var myRef : Type | Null = null
2883
2884
private var computed = false
Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ class PlainPrinter(_ctx: Context) extends Printer {
50
50
tp match {
51
51
case tp : ThisType if tp.cls.is(Package ) && ! tp.cls.isEffectiveRoot =>
52
52
requiredPackage(tp.cls.fullName).termRef
53
+ case tp : TypeRef =>
54
+ val tp1 = tp.dealiasKeepAnnots
55
+ if tp1 ne tp then homogenize(tp1) else tp
53
56
case tp : TypeVar if tp.isInstantiated =>
54
57
homogenize(tp.instanceOpt)
55
58
case AndType (tp1, tp2) =>
@@ -60,6 +63,8 @@ class PlainPrinter(_ctx: Context) extends Printer {
60
63
if ! ctx.mode.is(Mode .Type ) && annot.symbol == defn.UncheckedVarianceAnnot =>
61
64
homogenize(parent)
62
65
case tp : SkolemType =>
66
+ // println(tp.info)
67
+ // println(tp.info.widen)
63
68
homogenize(tp.info)
64
69
case tp : LazyRef =>
65
70
homogenize(tp.ref)
Original file line number Diff line number Diff line change @@ -387,10 +387,10 @@ object ProtoTypes {
387
387
case _ =>
388
388
targ = typerFn(arg)
389
389
if ctx.reporter.hasUnreportedErrors then
390
- if hasInnerErrors(targ) then
390
+ if hasInnerErrors(targ.nn ) then
391
391
state.errorArgs += arg
392
392
else
393
- state.typedArg = state.typedArg.updated(arg, targ)
393
+ state.typedArg = state.typedArg.updated(arg, targ.nn )
394
394
state.errorArgs -= arg
395
395
}
396
396
targ.nn
You can’t perform that action at this time.
0 commit comments