@@ -124,6 +124,8 @@ object ProtoTypes {
124
124
override def revealIgnored = ignored
125
125
override def deepenProto (using Context ): Type = ignored
126
126
127
+ override def isErroneous (using Context ): Boolean = ignored.isErroneous
128
+
127
129
override def computeHash (bs : Hashable .Binders ): Int = doHash(bs, ignored)
128
130
129
131
override def eql (that : Type ): Boolean = that match
@@ -193,6 +195,9 @@ object ProtoTypes {
193
195
if ((name eq this .name) && (memberProto eq this .memberProto) && (compat eq this .compat)) this
194
196
else SelectionProto (name, memberProto, compat, privateOK)
195
197
198
+ override def isErroneous (using Context ): Boolean =
199
+ memberProto.isErroneous
200
+
196
201
def map (tm : TypeMap )(using Context ): SelectionProto = derivedSelectionProto(name, tm(memberProto), compat)
197
202
def fold [T ](x : T , ta : TypeAccumulator [T ])(using Context ): T = ta(x, memberProto)
198
203
@@ -401,7 +406,7 @@ object ProtoTypes {
401
406
def isDropped : Boolean = state.toDrop
402
407
403
408
override def isErroneous (using Context ): Boolean =
404
- state.typedArgs.tpes. exists(_.isErroneous)
409
+ state.typedArgs.exists(_.tpe .isErroneous)
405
410
406
411
override def toString : String = s " FunProto( ${args mkString " ," } => $resultType) "
407
412
@@ -453,6 +458,9 @@ object ProtoTypes {
453
458
if ((argType eq this .argType) && (resultType eq this .resultType)) this
454
459
else ViewProto (argType, resultType)
455
460
461
+ override def isErroneous (using Context ): Boolean =
462
+ argType.isErroneous || resType.isErroneous
463
+
456
464
def map (tm : TypeMap )(using Context ): ViewProto = derivedViewProto(tm(argType), tm(resultType))
457
465
458
466
def fold [T ](x : T , ta : TypeAccumulator [T ])(using Context ): T =
@@ -496,6 +504,9 @@ object ProtoTypes {
496
504
if ((targs eq this .targs) && (resType eq this .resType)) this
497
505
else PolyProto (targs, resType)
498
506
507
+ override def isErroneous (using Context ): Boolean =
508
+ targs.exists(_.tpe.isErroneous)
509
+
499
510
def map (tm : TypeMap )(using Context ): PolyProto =
500
511
derivedPolyProto(targs, tm(resultType))
501
512
0 commit comments