@@ -1051,7 +1051,7 @@ trait MacroCommons extends CompatMacroCommons { bundle =>
10511051 actualParamType(param.typeSignature)
10521052
10531053 def actualParamType (tpe : Type ): Type = tpe match {
1054- case TypeRef (_, s, List (arg)) if s == definitions.RepeatedParamClass =>
1054+ case TypeRef (_, s, List (arg)) if s == definitions.RepeatedParamClass || s == definitions. JavaRepeatedParamClass =>
10551055 getType(tq " $ScalaPkg.Seq[ $arg] " )
10561056 case TypeRef (_, s, List (arg)) if s == definitions.ByNameParamClass =>
10571057 arg
@@ -1409,17 +1409,26 @@ trait MacroCommons extends CompatMacroCommons { bundle =>
14091409 }
14101410 }
14111411
1412- def determineTypeParams (undetTpe : Type , detTpe : Type , typeParams : List [Symbol ]): Option [List [Type ]] = {
1412+ def determineTypeParams (undetTpe : Type , detTpe : Type , typeParams : List [Symbol ], debug : Boolean = false ): Option [List [Type ]] = {
14131413 val methodName = c.freshName(TermName (" m" ))
14141414 val typeDefs = typeParams.map(typeSymbolToTypeDef(_, forMethod = true ))
14151415
1416+ if (debug) {
1417+ q """
1418+ def $methodName[.. $typeDefs](f: ${treeForType(undetTpe)} => $UnitCls): $UnitCls = ()
1419+ $methodName((_: $detTpe) => ())
1420+ """ .debug(" " )
1421+ }
1422+
14161423 val tree = typecheck(
14171424 q """
14181425 def $methodName[.. $typeDefs](f: ${treeForType(undetTpe)} => $UnitCls): $UnitCls = ()
14191426 $methodName((_: $detTpe) => ())
14201427 """ , silent = true
14211428 )
14221429
1430+ if (debug) println(tree)
1431+
14231432 tree match {
14241433 case Block (_, Apply (TypeApply (_, args), _)) => Some (args.map(_.tpe))
14251434 case Block (_, Apply (_, _)) => Some (Nil )
0 commit comments