@@ -4178,24 +4178,28 @@ object Types extends TypeUtils {
41784178     *   - wrap types of parameters that have an @allowConversions annotation with Into[_] 
41794179     */  
41804180    def  fromSymbols (params : List [Symbol ], resultType : Type )(using  Context ):  MethodType  = 
4181+       apply(params.map(_.name.asTermName))(
4182+          tl =>  params.map(p =>  tl.integrate(params, adaptParamInfo(p))),
4183+          tl =>  tl.integrate(params, resultType))
4184+ 
4185+     /**  Adapt info of parameter symbol to be integhrated into corresponding MethodType 
4186+      *  using the scheme described in `fromSymbols`. 
4187+      */  
4188+     def  adaptParamInfo (param : Symbol , pinfo : Type )(using  Context ):  Type  = 
41814189      def  addAnnotation (tp : Type , cls : ClassSymbol , param : Symbol ):  Type  =  tp match 
41824190        case  ExprType (resType) =>  ExprType (addAnnotation(resType, cls, param))
41834191        case  _ =>  AnnotatedType (tp, Annotation (cls, param.span))
4184- 
4185-       def  paramInfo (param : Symbol ) = 
4186-         var  paramType  =  param.info
4187-           .annotatedToRepeated
4188-           .mapIntoAnnot(defn.IntoAnnot , defn.IntoParamAnnot )
4189-         if  param.is(Inline ) then 
4190-           paramType =  addAnnotation(paramType, defn.InlineParamAnnot , param)
4191-         if  param.is(Erased ) then 
4192-           paramType =  addAnnotation(paramType, defn.ErasedParamAnnot , param)
4193-         paramType
4194- 
4195-       apply(params.map(_.name.asTermName))(
4196-          tl =>  params.map(p =>  tl.integrate(params, paramInfo(p))),
4197-          tl =>  tl.integrate(params, resultType))
4198-     end  fromSymbols 
4192+       var  paramType  =  pinfo
4193+         .annotatedToRepeated
4194+         .mapIntoAnnot(defn.IntoAnnot , defn.IntoParamAnnot )
4195+       if  param.is(Inline ) then 
4196+         paramType =  addAnnotation(paramType, defn.InlineParamAnnot , param)
4197+       if  param.is(Erased ) then 
4198+         paramType =  addAnnotation(paramType, defn.ErasedParamAnnot , param)
4199+       paramType
4200+ 
4201+     def  adaptParamInfo (param : Symbol )(using  Context ):  Type  = 
4202+       adaptParamInfo(param, param.info)
41994203
42004204    def  apply (paramNames : List [TermName ])(paramInfosExp : MethodType  =>  List [Type ], resultTypeExp : MethodType  =>  Type )(using  Context ):  MethodType  = 
42014205      checkValid(unique(new  CachedMethodType (paramNames)(paramInfosExp, resultTypeExp, self)))
0 commit comments