aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/src/dotty/tools/dotc/core/Types.scala2
-rw-r--r--tests/pos/i2071.scala7
2 files changed, 9 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala
index 639f5d142..2e471215b 100644
--- a/compiler/src/dotty/tools/dotc/core/Types.scala
+++ b/compiler/src/dotty/tools/dotc/core/Types.scala
@@ -3328,6 +3328,8 @@ object Types {
zeroParamClass(tp.underlying)
case tp: TypeVar =>
zeroParamClass(tp.underlying)
+ case tp: HKApply =>
+ zeroParamClass(tp.superType)
case _ =>
NoType
}
diff --git a/tests/pos/i2071.scala b/tests/pos/i2071.scala
new file mode 100644
index 000000000..1855dccf4
--- /dev/null
+++ b/tests/pos/i2071.scala
@@ -0,0 +1,7 @@
+object Test {
+ type PF[A, B] = PartialFunction[A, B]
+
+ val f: PF[Int, String] = {
+ case i => "bar"
+ }
+} \ No newline at end of file