summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2010-05-04 14:40:10 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2010-05-04 14:40:10 +0000
commit185b1c828a7f859b32b136e873373a9b79edc304 (patch)
tree984febdc294a050184ad7f55cb4d3d1bddae75b9 /src/compiler/scala/tools/nsc/typechecker/Contexts.scala
parent20192c84a98212ba2de6f52553b4ec7dafb6c6c3 (diff)
downloadscala-185b1c828a7f859b32b136e873373a9b79edc304.tar.gz
scala-185b1c828a7f859b32b136e873373a9b79edc304.tar.bz2
scala-185b1c828a7f859b32b136e873373a9b79edc304.zip
close #3384.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index 8758dd834c..82c4c01b79 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -487,6 +487,15 @@ trait Contexts { self: Analyzer =>
implicitsCache
}
+ /**
+ * Find a symbol in this context or one of its outers.
+ *
+ * Used to find symbols are owned by methods (or fields), they can't be
+ * found in some scope.
+ *
+ * Examples: companion module of classes owned by a method, default getter
+ * methods of nested methods. See NamesDefaults.scala
+ */
def lookup(name: Name, expectedOwner: Symbol) = {
var res: Symbol = NoSymbol
var ctx = this