summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-03-30 16:21:49 +0000
committerMartin Odersky <odersky@gmail.com>2009-03-30 16:21:49 +0000
commit20f986ecf42cf3018bf3a90b84b2f84669838b10 (patch)
tree11f4510c6822ccc98deeaa086faaa6a36469a1a5 /src/compiler/scala/tools/nsc/typechecker/Implicits.scala
parent070c60f7472f8c0352287e9d68df8bd35a8ae0a4 (diff)
downloadscala-20f986ecf42cf3018bf3a90b84b2f84669838b10.tar.gz
scala-20f986ecf42cf3018bf3a90b84b2f84669838b10.tar.bz2
scala-20f986ecf42cf3018bf3a90b84b2f84669838b10.zip
changed overloaing resolution to make Builders ...
changed overloaing resolution to make Builders work. generalized companion object generation in Namers. Fixed a problem in Types that made the collection build crash.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Implicits.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Implicits.scala12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
index 0efdc6fbe2..6c7a126ccc 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
@@ -105,7 +105,7 @@ self: Analyzer =>
}
/** A sentinel indicating no implicit was found */
- val NoImplicitInfo = new ImplicitInfo(null, null, null)
+ val NoImplicitInfo = new ImplicitInfo(null, NoType, NoSymbol)
/** A class that sets up an implicit search. For more info, see comments for `inferImplicit`.
* @param tree The tree for which the implicit needs to be inserted.
@@ -463,20 +463,16 @@ self: Analyzer =>
// Also check that applicable infos that did not get selected are not
// in (a companion object of) a subclass of (a companion object of) the class
// containing the winning info.
+ /*
for (alt <- applicable.keySet) {
- /** Is (the companion class of) `sym1` a subclass of (the compansion class of) `sym2`? */
- def isSubClassOrObject(sym1: Symbol, sym2: Symbol): Boolean =
- sym1 != NoSymbol && (sym1 isSubClass sym2) ||
- sym1.isModuleClass && isSubClassOrObject(sym1.linkedClassOfClass, sym2) ||
- sym2.isModuleClass && isSubClassOrObject(sym1, sym2.linkedClassOfClass)
-
- if (alt.sym.owner != best.sym.owner && isSubClassOrObject(alt.sym.owner, best.sym.owner)) {
+ if (isProperSubClassOrObject(alt.sym.owner, best.sym.owner)) {
ambiguousImplicitError(best, alt,
"most specific definition is:",
"yet alternative definition ",
"is defined in a subclass.\n Both definitions ")
}
}
+ */
applicable(best)
}
} // end searchImplicit