From 54a1bce87b4682ccfb97504e2daa7c36cbf207b2 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 12 Oct 2013 12:58:30 +0200 Subject: Tightening up typer state + printing refinements 1) Made consistency checking water tight, so that inconsistencies are always catched wehn they arise 2) Fixed problem in implicit search that led to inconsistencies 3) Refined printing of type parameters and type arguments --- src/dotty/tools/dotc/typer/Applications.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (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 05008ac1a..ef0fcf709 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -633,7 +633,7 @@ trait Applications extends Compatibility { self: Typer => * @param resultType The expected result type of the application */ def isApplicableToTrees(methRef: TermRef, args: List[Tree], resultType: Type)(implicit ctx: Context): Boolean = - new ApplicableToTrees(methRef, args, resultType)(ctx.fresh.withNewTyperState).success + new ApplicableToTrees(methRef, args, resultType)(ctx.fresh.withExploreTyperState).success def isApplicableToTrees(tp: Type, args: List[Tree], resultType: Type)(implicit ctx: Context): Boolean = tp match { case methRef: TermRef => isApplicableToTrees(methRef, args, resultType) @@ -647,7 +647,7 @@ trait Applications extends Compatibility { self: Typer => * @param resultType The expected result type of the application */ def isApplicableToTypes(methRef: TermRef, args: List[Type], resultType: Type = WildcardType)(implicit ctx: Context) = - new ApplicableToTypes(methRef, args, resultType)(ctx.fresh.withNewTyperState).success + new ApplicableToTypes(methRef, args, resultType)(ctx.fresh.withExploreTyperState).success def isApplicableToTypes(tp: Type, args: List[Type], resultType: Type)(implicit ctx: Context): Boolean = tp match { case methRef: TermRef => isApplicableToTypes(methRef, args, resultType) @@ -659,7 +659,7 @@ trait Applications extends Compatibility { self: Typer => /** Is `tp` a subtype of `pt`? */ def testCompatible(tp: Type, pt: Type)(implicit ctx: Context) = - isCompatible(tp, pt)(ctx.fresh.withNewTyperState) + isCompatible(tp, pt)(ctx.fresh.withExploreTyperState) /** In a set of overloaded applicable alternatives, is `alt1` at least as good as * `alt2`? `alt1` and `alt2` are nonoverloaded references. -- cgit v1.2.3