diff options
Diffstat (limited to 'src/dotty/tools/dotc/typer/Inferencing.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Inferencing.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala index 2b37fa36c..6becd29ec 100644 --- a/src/dotty/tools/dotc/typer/Inferencing.scala +++ b/src/dotty/tools/dotc/typer/Inferencing.scala @@ -177,12 +177,14 @@ object Inferencing { def widenForMatchSelector(tp: Type)(implicit ctx: Context): Type = tp.widen match { case tp: TypeRef if !tp.symbol.isClass => widenForMatchSelector(tp.info.bounds.hi) - case tp: AnnotatedType => - tp.derivedAnnotatedType(widenForMatchSelector(tp.tpe), tp.annot) case tp @ RefinedType(parent, rname, rinfo) if !parent.typeSymbol.isClass => tp.derivedRefinedType(widenForMatchSelector(parent), rname, rinfo) case tp: RecType if !tp.parent.typeSymbol.isClass => tp.derivedRecType(widenForMatchSelector(tp.parent)) + case tp: HKApply => + widenForMatchSelector(tp.upperBound) + case tp: AnnotatedType => + tp.derivedAnnotatedType(widenForMatchSelector(tp.tpe), tp.annot) case tp => tp } |