aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Inferencing.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-06-22 09:41:52 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-11 13:35:04 +0200
commit960ea75c97e69ae65e2c6df2aa8dd266b0b09e50 (patch)
tree951c086513e149f8f5b22b6ad05af12bf210dd28 /src/dotty/tools/dotc/typer/Inferencing.scala
parent1e48758ad5c100a7dd4d1a5b846ef5ff37e37721 (diff)
downloaddotty-960ea75c97e69ae65e2c6df2aa8dd266b0b09e50.tar.gz
dotty-960ea75c97e69ae65e2c6df2aa8dd266b0b09e50.tar.bz2
dotty-960ea75c97e69ae65e2c6df2aa8dd266b0b09e50.zip
Allow for HK types in widenForMatchSelector
Diffstat (limited to 'src/dotty/tools/dotc/typer/Inferencing.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Inferencing.scala6
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
}