From 818d42d20bae1c446e9d540ce801d63b0eb4450a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 29 Jan 2014 17:34:56 +0100 Subject: Add early discarding of methods for eligible check. MethodTypes and PolyTypes now check their argument for compatibility before setting up a complete isApplicable test. --- src/dotty/tools/dotc/core/StdNames.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/core') diff --git a/src/dotty/tools/dotc/core/StdNames.scala b/src/dotty/tools/dotc/core/StdNames.scala index 5549ddd92..a20d26e42 100644 --- a/src/dotty/tools/dotc/core/StdNames.scala +++ b/src/dotty/tools/dotc/core/StdNames.scala @@ -26,7 +26,7 @@ object StdNames { } abstract class ScalaNames[N <: Name] extends DefinedNames[N] { - private def encode(s: String): N = fromName(fromString(s).encode) + protected def encode(s: String): N = fromName(fromString(s).encode) // Keywords, need to come first ----------------------- @@ -636,8 +636,7 @@ object StdNames { class ScalaTypeNames extends ScalaNames[TypeName] { protected implicit def fromString(s: String): TypeName = typeName(s) - @switch def syntheticTypeParamName(i: Int): TypeName = - typeName("T"+i) + @switch def syntheticTypeParamName(i: Int): TypeName = "T"+i def syntheticTypeParamNames(num: Int): List[TypeName] = (0 until num).map(syntheticTypeParamName)(breakOut) -- cgit v1.2.3