aboutsummaryrefslogtreecommitdiff
path: root/src/dotty
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-10 17:21:50 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-10 17:21:50 +0100
commit68d7ea1534f6145d59506138d6af169cc27f9aa3 (patch)
treeb08c7b165a8b2d20380a26cd52c5b524a496cea4 /src/dotty
parent5d38be773a2083fa2112f5cb688070b867634120 (diff)
downloaddotty-68d7ea1534f6145d59506138d6af169cc27f9aa3.tar.gz
dotty-68d7ea1534f6145d59506138d6af169cc27f9aa3.tar.bz2
dotty-68d7ea1534f6145d59506138d6af169cc27f9aa3.zip
Removing conforms from StdNames because it shadows Predef.conforms, which is needed a lot for implicit search.
We need to use a less common name for Predef.conforms!
Diffstat (limited to 'src/dotty')
-rw-r--r--src/dotty/tools/dotc/core/Scopes.scala8
-rw-r--r--src/dotty/tools/dotc/core/StdNames.scala2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/Scopes.scala b/src/dotty/tools/dotc/core/Scopes.scala
index 06f9ea6c1..cdc596e2b 100644
--- a/src/dotty/tools/dotc/core/Scopes.scala
+++ b/src/dotty/tools/dotc/core/Scopes.scala
@@ -184,7 +184,7 @@ object Scopes {
}
/** enter a symbol, asserting that no symbol with same name exists in scope */
- final def enterUnique(sym: Symbol)(implicit ctx: Context) {
+ final def enterUnique(sym: Symbol)(implicit ctx: Context): Unit = {
assert(lookup(sym.name) == NoSymbol, (sym.showLocated, lookup(sym.name).showLocated))
enter(sym)
}
@@ -199,7 +199,7 @@ object Scopes {
enterAllInHash(lastEntry)
}
- private def enterAllInHash(e: ScopeEntry, n: Int = 0)(implicit ctx: Context) {
+ private def enterAllInHash(e: ScopeEntry, n: Int = 0)(implicit ctx: Context): Unit = {
if (e ne null) {
if (n < MaxRecursions) {
enterAllInHash(e.prev, n + 1)
@@ -217,7 +217,7 @@ object Scopes {
}
/** Remove entry from this scope (which is required to be present) */
- final def unlink(e: ScopeEntry)(implicit ctx: Context) {
+ final def unlink(e: ScopeEntry)(implicit ctx: Context): Unit = {
if (lastEntry == e) {
lastEntry = e.prev
} else {
@@ -240,7 +240,7 @@ object Scopes {
}
/** remove symbol from this scope if it is present */
- final def unlink(sym: Symbol)(implicit ctx: Context) {
+ final def unlink(sym: Symbol)(implicit ctx: Context): Unit = {
var e = lookupEntry(sym.name)
while (e ne null) {
if (e.sym == sym) unlink(e);
diff --git a/src/dotty/tools/dotc/core/StdNames.scala b/src/dotty/tools/dotc/core/StdNames.scala
index 73c53df6a..5549ddd92 100644
--- a/src/dotty/tools/dotc/core/StdNames.scala
+++ b/src/dotty/tools/dotc/core/StdNames.scala
@@ -339,7 +339,7 @@ object StdNames {
val ClassManifestFactory: N = "ClassManifestFactory"
val classOf: N = "classOf"
val clone_ : N = "clone"
- val conforms: N = "conforms"
+ // val conforms : N = "conforms" // Dotty deviation: no special treatment of conforms, so the occurrence of the name here would cause to unintended implicit shadowing. Should find a less common name for it in Predef.
val copy: N = "copy"
val currentMirror: N = "currentMirror"
val definitions: N = "definitions"