@@ -993,19 +993,19 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
993993 * @param resultType The expected result type of the application
994994 */
995995 def isApplicable (methRef : TermRef , targs : List [Type ], args : List [Tree ], resultType : Type )(implicit ctx : Context ): Boolean =
996- ctx.typerState. test(new ApplicableToTrees (methRef, targs, args, resultType).success)
996+ ctx.test(implicit ctx => new ApplicableToTrees (methRef, targs, args, resultType).success)
997997
998998 /** Is given method reference applicable to type arguments `targs` and argument trees `args` without inferring views?
999999 * @param resultType The expected result type of the application
10001000 */
10011001 def isDirectlyApplicable (methRef : TermRef , targs : List [Type ], args : List [Tree ], resultType : Type )(implicit ctx : Context ): Boolean =
1002- ctx.typerState. test(new ApplicableToTreesDirectly (methRef, targs, args, resultType).success)
1002+ ctx.test(implicit ctx => new ApplicableToTreesDirectly (methRef, targs, args, resultType).success)
10031003
10041004 /** Is given method reference applicable to argument types `args`?
10051005 * @param resultType The expected result type of the application
10061006 */
10071007 def isApplicable (methRef : TermRef , args : List [Type ], resultType : Type )(implicit ctx : Context ): Boolean =
1008- ctx.typerState. test(new ApplicableToTypes (methRef, args, resultType).success)
1008+ ctx.test(implicit ctx => new ApplicableToTypes (methRef, args, resultType).success)
10091009
10101010 /** Is given type applicable to type arguments `targs` and argument trees `args`,
10111011 * possibly after inserting an `apply`?
@@ -1110,7 +1110,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
11101110 case tp2 : MethodType => true // (3a)
11111111 case tp2 : PolyType if tp2.resultType.isInstanceOf [MethodType ] => true // (3a)
11121112 case tp2 : PolyType => // (3b)
1113- ctx.typerState. test(isAsSpecificValueType(tp1, constrained(tp2).resultType))
1113+ ctx.test(implicit ctx => isAsSpecificValueType(tp1, constrained(tp2).resultType))
11141114 case _ => // (3b)
11151115 isAsSpecificValueType(tp1, tp2)
11161116 }
@@ -1262,9 +1262,9 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
12621262 * do they prune much, on average.
12631263 */
12641264 def adaptByResult (chosen : TermRef ) = pt match {
1265- case pt : FunProto if ! ctx.typerState. test(resultConforms(chosen, pt.resultType)) =>
1265+ case pt : FunProto if ! ctx.test(implicit ctx => resultConforms(chosen, pt.resultType)) =>
12661266 val conformingAlts = alts.filter(alt =>
1267- (alt ne chosen) && ctx.typerState. test(resultConforms(alt, pt.resultType)))
1267+ (alt ne chosen) && ctx.test(implicit ctx => resultConforms(alt, pt.resultType)))
12681268 conformingAlts match {
12691269 case Nil => chosen
12701270 case alt2 :: Nil => alt2
0 commit comments