From fe85a5aa18e071922d11f1dd1694fe478b9d4fad Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 27 Jan 2014 10:17:47 +0100 Subject: Accept method types directly in isApplicable. This lets us streamline normalize, and avoid to create FunctionTypes if the expected type is a FunProto or ViewProto. --- src/dotty/tools/dotc/typer/Applications.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/dotty/tools/dotc/typer/Applications.scala') diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index 0969562da..f504ffacd 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -736,6 +736,8 @@ trait Applications extends Compatibility { self: Typer => private def onMethod(tp: Type, p: TermRef => Boolean)(implicit ctx: Context): Boolean = tp match { case methRef: TermRef if methRef.widenSingleton.isInstanceOf[SignedType] => p(methRef) + case mt: SignedType => + p(mt.narrow) case _ => tp.member(nme.apply).hasAltWith(d => p(TermRef(tp, nme.apply, d))) } -- cgit v1.2.3