File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -391,14 +391,19 @@ object QuotesAndSplices {
391
391
*/
392
392
def apply (typeargs : List [Type ], args : List [Type ], resultType : Type )(using Context ): Type =
393
393
val typeargs1 = PolyType .syntheticParamNames(typeargs.length)
394
- val paraminfosExp = (_ : PolyType ) => typeargs map (_.bounds)
394
+ val bounds = typeargs map { tpe =>
395
+ ctx.gadt.fullBounds(tpe.typeSymbol) match
396
+ case b: TypeBounds => b
397
+ case _ => TypeBounds .empty
398
+ }
399
+ println(s " bounds = ${bounds map (_.show)}" )
395
400
val resultTypeExp = (pt : PolyType ) => {
396
401
val fromSymbols = typeargs map (_.typeSymbol)
397
402
val args1 = args map (_.subst(fromSymbols, pt.paramRefs))
398
403
val resultType1 = resultType.subst(fromSymbols, pt.paramRefs)
399
404
MethodType (args1, resultType)
400
405
}
401
- val tpe = PolyType (typeargs1)(paraminfosExp , resultTypeExp)
406
+ val tpe = PolyType (typeargs1)(_ => bounds , resultTypeExp)
402
407
RefinedType (defn.PolyFunctionType , nme.apply, tpe)
403
408
}
404
409
}
You can’t perform that action at this time.
0 commit comments