@@ -1002,19 +1002,19 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
10021002 * @param resultType The expected result type of the application
10031003 */
10041004 def isApplicable (methRef : TermRef , targs : List [Type ], args : List [Tree ], resultType : Type )(implicit ctx : Context ): Boolean =
1005- ctx.typerState. test(new ApplicableToTrees (methRef, targs, args, resultType).success)
1005+ ctx.test(implicit ctx => new ApplicableToTrees (methRef, targs, args, resultType).success)
10061006
10071007 /** Is given method reference applicable to type arguments `targs` and argument trees `args` without inferring views?
10081008 * @param resultType The expected result type of the application
10091009 */
10101010 def isDirectlyApplicable (methRef : TermRef , targs : List [Type ], args : List [Tree ], resultType : Type )(implicit ctx : Context ): Boolean =
1011- ctx.typerState. test(new ApplicableToTreesDirectly (methRef, targs, args, resultType).success)
1011+ ctx.test(implicit ctx => new ApplicableToTreesDirectly (methRef, targs, args, resultType).success)
10121012
10131013 /** Is given method reference applicable to argument types `args`?
10141014 * @param resultType The expected result type of the application
10151015 */
10161016 def isApplicable (methRef : TermRef , args : List [Type ], resultType : Type )(implicit ctx : Context ): Boolean =
1017- ctx.typerState. test(new ApplicableToTypes (methRef, args, resultType).success)
1017+ ctx.test(implicit ctx => new ApplicableToTypes (methRef, args, resultType).success)
10181018
10191019 /** Is given type applicable to type arguments `targs` and argument trees `args`,
10201020 * possibly after inserting an `apply`?
@@ -1119,7 +1119,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
11191119 case tp2 : MethodType => true // (3a)
11201120 case tp2 : PolyType if tp2.resultType.isInstanceOf [MethodType ] => true // (3a)
11211121 case tp2 : PolyType => // (3b)
1122- ctx.typerState. test(isAsSpecificValueType(tp1, constrained(tp2).resultType))
1122+ ctx.test(implicit ctx => isAsSpecificValueType(tp1, constrained(tp2).resultType))
11231123 case _ => // (3b)
11241124 isAsSpecificValueType(tp1, tp2)
11251125 }
@@ -1271,9 +1271,9 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
12711271 * do they prune much, on average.
12721272 */
12731273 def adaptByResult (chosen : TermRef ) = pt match {
1274- case pt : FunProto if ! ctx.typerState. test(resultConforms(chosen, pt.resultType)) =>
1274+ case pt : FunProto if ! ctx.test(implicit ctx => resultConforms(chosen, pt.resultType)) =>
12751275 val conformingAlts = alts.filter(alt =>
1276- (alt ne chosen) && ctx.typerState. test(resultConforms(alt, pt.resultType)))
1276+ (alt ne chosen) && ctx.test(implicit ctx => resultConforms(alt, pt.resultType)))
12771277 conformingAlts match {
12781278 case Nil => chosen
12791279 case alt2 :: Nil => alt2
0 commit comments