diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Implicits.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index 77dde88a80..3b90eaeed7 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -214,10 +214,10 @@ trait Implicits { /** An extractor for types of the form ? { name: (? >: argtpe <: Any*)restp } */ object HasMethodMatching { + val dummyMethod = new TermSymbol(NoSymbol, NoPosition, newTermName("typer$dummy")) + def templateArgType(argtpe: Type) = new BoundedWildcardType(TypeBounds.lower(argtpe)) + def apply(name: Name, argtpes: List[Type], restpe: Type): Type = { - def templateArgType(argtpe: Type) = - new BoundedWildcardType(TypeBounds(argtpe, AnyClass.tpe)) - val dummyMethod = new TermSymbol(NoSymbol, NoPosition, "typer$dummy") val mtpe = MethodType(dummyMethod.newSyntheticValueParams(argtpes map templateArgType), restpe) memberWildcardType(name, mtpe) } |