aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Symbols.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-04-30 17:49:19 +0200
committerMartin Odersky <odersky@gmail.com>2013-04-30 17:49:19 +0200
commit273873d09c2e0e5080612a7f8a40cab138b41daa (patch)
tree28685f8659033ae5912374014fde0f3ae3ab626e /src/dotty/tools/dotc/core/Symbols.scala
parent68021907ec042d2e0404e47303c2723bde375f16 (diff)
downloaddotty-273873d09c2e0e5080612a7f8a40cab138b41daa.tar.gz
dotty-273873d09c2e0e5080612a7f8a40cab138b41daa.tar.bz2
dotty-273873d09c2e0e5080612a7f8a40cab138b41daa.zip
Small fixes prompted by last week's code walkthrough.
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index aa829b9e7..728a2b8cc 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -108,7 +108,7 @@ trait Symbols { this: Context =>
name: TermName,
modFlags: FlagSet,
clsFlags: FlagSet,
- infoFn: (TermSymbol, ClassSymbol) => Type,
+ infoFn: (TermSymbol, ClassSymbol) => Type, // typically a ModuleClassCompleterWithDecls
privateWithin: Symbol = NoSymbol,
coord: Coord = NoCoord,
assocFile: AbstractFile = null): TermSymbol
@@ -258,7 +258,7 @@ trait Symbols { this: Context =>
symbol = copy,
owner = treeMap.ownerMap(odenot.owner),
info = treeMap.typeMap(odenot.info),
- privateWithin = ownerMap(odenot.privateWithin),
+ privateWithin = ownerMap(odenot.privateWithin), // since this refers to outer symbols, need not include copies (from->to) in ownermap here.
annotations = odenot.annotations.mapConserve(treeMap.apply))
}
copies
@@ -281,7 +281,7 @@ trait Symbols { this: Context =>
object Symbols {
- var _nextId = 0 // !!! DEBUG
+ var _nextId = 0 // !!! DEBUG, use global counter instead
def nextId = { _nextId += 1; _nextId }
@@ -354,6 +354,7 @@ object Symbols {
/** The source or class file from which this class or
* the class containing this symbol was generated, null if not applicable.
+ * Overridden in ClassSymbol
*/
def associatedFile(implicit ctx: Context): AbstractFile =
denot.topLevelClass.symbol.associatedFile