@@ -479,6 +479,8 @@ object Types extends TypeUtils {
479479 /** Is this a Method or PolyType which has implicit or contextual parameters? */
480480 def isImplicitMethod : Boolean = false
481481
482+ def wasImplicitMethod : Boolean = false
483+
482484 /** Is this a Method or PolyType which has contextual parameters as first value parameter list? */
483485 def isContextualMethod : Boolean = false
484486
@@ -4104,7 +4106,10 @@ object Types extends TypeUtils {
41044106 paramInfos.exists(p => p.hasAnnotation(defn.ErasedParamAnnot ))
41054107
41064108 final override def isContextualMethod : Boolean =
4107- companion.eq(ContextualMethodType )
4109+ companion.eq(ContextualMethodType ) || companion.eq(ContextualFromImplicitMethodType )
4110+
4111+ final override def wasImplicitMethod : Boolean =
4112+ companion.eq(ContextualFromImplicitMethodType )
41084113
41094114 def erasedParams (using Context ): List [Boolean ] =
41104115 paramInfos.map(p => p.hasAnnotation(defn.ErasedParamAnnot ))
@@ -4209,14 +4214,16 @@ object Types extends TypeUtils {
42094214 }
42104215
42114216 object MethodType extends MethodTypeCompanion (" MethodType" ) {
4212- def companion (isContextual : Boolean = false , isImplicit : Boolean = false ): MethodTypeCompanion =
4213- if (isContextual) ContextualMethodType
4217+ def companion (isContextual : Boolean = false , isImplicit : Boolean = false , fromImplicit : Boolean = false ): MethodTypeCompanion =
4218+ if (fromImplicit) ContextualFromImplicitMethodType
4219+ else if (isContextual) ContextualMethodType
42144220 else if (isImplicit) ImplicitMethodType
42154221 else MethodType
42164222 }
42174223
42184224 object ContextualMethodType extends MethodTypeCompanion (" ContextualMethodType" )
42194225 object ImplicitMethodType extends MethodTypeCompanion (" ImplicitMethodType" )
4226+ object ContextualFromImplicitMethodType extends MethodTypeCompanion (" ContextualFromImplicitMethodType" )
42204227
42214228 /** A ternary extractor for MethodType */
42224229 object MethodTpe {
0 commit comments