aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/StdNames.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-29 17:34:56 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-29 17:34:56 +0100
commit818d42d20bae1c446e9d540ce801d63b0eb4450a (patch)
treeef1f9ab88d077a5928082fa0523cf3bcfca2f151 /src/dotty/tools/dotc/core/StdNames.scala
parenta4b3494a7fcdcb3513afd73099a12108d87e4e48 (diff)
downloaddotty-818d42d20bae1c446e9d540ce801d63b0eb4450a.tar.gz
dotty-818d42d20bae1c446e9d540ce801d63b0eb4450a.tar.bz2
dotty-818d42d20bae1c446e9d540ce801d63b0eb4450a.zip
Add early discarding of methods for eligible check.
MethodTypes and PolyTypes now check their argument for compatibility before setting up a complete isApplicable test.
Diffstat (limited to 'src/dotty/tools/dotc/core/StdNames.scala')
-rw-r--r--src/dotty/tools/dotc/core/StdNames.scala5
1 files changed, 2 insertions, 3 deletions
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)