summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
diff options
context:
space:
mode:
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