aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Symbols.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-02-08 22:46:59 +0100
committerMartin Odersky <odersky@gmail.com>2013-02-08 22:48:05 +0100
commite8366c0fe9b5c04ba471d9f3f572d9ea0c684fbb (patch)
tree3ee88cedc116b691244c7a10611b875f76619d50 /src/dotty/tools/dotc/core/Symbols.scala
parentdc137d37524e560e89a10e2ebd2e78c818e2205e (diff)
downloaddotty-e8366c0fe9b5c04ba471d9f3f572d9ea0c684fbb.tar.gz
dotty-e8366c0fe9b5c04ba471d9f3f572d9ea0c684fbb.tar.bz2
dotty-e8366c0fe9b5c04ba471d9f3f572d9ea0c684fbb.zip
Added new utility methods to SymDenotations and refactored creation.
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index c345128b3..76c329d66 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -47,7 +47,7 @@ trait Symbols { this: Context =>
newLazyModuleSymbols(owner, name, PackageCreationFlags, completer)
def newSymbol[N <: Name](owner: Symbol, name: N, flags: FlagSet, info: Type, privateWithin: Symbol = NoSymbol) =
- new Symbol(new CompleteSymDenotation(_, owner, name, flags, privateWithin, info)) {
+ new Symbol(CompleteSymDenotation(_, owner, name, flags, info, privateWithin)) {
type ThisName = N
}
@@ -62,7 +62,7 @@ trait Symbols { this: Context =>
assocFile: AbstractFile = null)
=
new ClassSymbol(new CompleteClassDenotation(
- _, owner, name, flags, privateWithin, parents, optSelfType, decls, assocFile)(this))
+ _, owner, name, flags, parents, privateWithin, optSelfType, decls, assocFile)(this))
def newModuleSymbols(
owner: Symbol,
@@ -166,7 +166,7 @@ object Symbols {
def show(implicit ctx: Context): String = ctx.show(this)
def showLocated(implicit ctx: Context): String = ctx.showLocated(this)
- def showDef(implicit ctx: Context): String = ctx.showDef(this)
+ def showDcl(implicit ctx: Context): String = ctx.showDcl(this)
def showKind(implicit tcx: Context): String = ???
def showName(implicit ctx: Context): String = ???
}
@@ -186,7 +186,8 @@ object Symbols {
def superId(implicit ctx: Context): Int = {
val hint = superIdHint
val key = this.typeConstructor
- if (hint >= 0 && hint <= ctx.lastSuperId && (ctx.classOfId(hint) eq key)) hint
+ if (hint >= 0 && hint <= ctx.lastSuperId && (ctx.classOfId(hint) eq key))
+ hint
else {
val id = ctx.superIdOfClass get key match {
case Some(id) =>