From 8d33ca7460493427055daaecca53c66127772831 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 19 Mar 2017 12:44:27 +0100 Subject: Merge MethodType and PolyType functionality where possible Two benefits: (1) less code. (2) finding subtle bugs about parameter dependent method types. By merging with PolyTypes we are forced to take parameter dependencies into account. --- compiler/src/dotty/tools/dotc/typer/Applications.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/typer/Applications.scala') diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala index 25c9c13d8..4e43e429b 100644 --- a/compiler/src/dotty/tools/dotc/typer/Applications.scala +++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala @@ -1284,8 +1284,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic => case x => x } - def sizeFits(alt: TermRef, tp: Type): Boolean = tp match { - case tp: PolyType => sizeFits(alt, tp.resultType) + def sizeFits(alt: TermRef, tp: Type): Boolean = tp.stripPoly match { case tp: MethodType => val ptypes = tp.paramInfos val numParams = ptypes.length -- cgit v1.2.3