aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Inferencing.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/Inferencing.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Inferencing.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala
index b85b7b6ca..a3d2cd19a 100644
--- a/src/dotty/tools/dotc/typer/Inferencing.scala
+++ b/src/dotty/tools/dotc/typer/Inferencing.scala
@@ -94,7 +94,7 @@ object Inferencing {
private var myTypedArg: SimpleMap[untpd.Tree, Tree] = SimpleMap.Empty
def isMatchedBy(tp: Type)(implicit ctx: Context) =
- typer.isApplicable(tp, typedArgs, resultType)
+ typer.isApplicable(tp, Nil, typedArgs, resultType)
def argsAreTyped: Boolean = myTypedArgs.nonEmpty || args.isEmpty
@@ -149,12 +149,12 @@ object Inferencing {
/** A prototype for expressions [] that are type-parameterized:
*
- * [] [?_, ..., ?_nargs] resultType
+ * [] [targs] resultType
*/
- case class PolyProto(nargs: Int, override val resultType: Type) extends UncachedGroundType with ProtoType {
+ case class PolyProto(targs: List[Type], override val resultType: Type) extends UncachedGroundType with ProtoType {
override def isMatchedBy(tp: Type)(implicit ctx: Context) = {
def isInstantiatable(tp: Type) = tp.widen match {
- case PolyType(paramNames) => paramNames.length == nargs
+ case PolyType(paramNames) => paramNames.length == targs.length
case _ => false
}
isInstantiatable(tp) || tp.member(nme.apply).hasAltWith(d => isInstantiatable(d.info))