aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-04-09 15:04:43 +0200
committerMartin Odersky <odersky@gmail.com>2013-04-09 15:06:27 +0200
commit442c361aee87266fe6428f1d9a5da7de934c8cef (patch)
tree0b98d9bcd202a6cad92cb75248722d8d6e100312 /src/dotty/tools/dotc/core
parentd1c2fe7ab3b2cddb224f24ce37fdc0bf4237d5a4 (diff)
downloaddotty-442c361aee87266fe6428f1d9a5da7de934c8cef.tar.gz
dotty-442c361aee87266fe6428f1d9a5da7de934c8cef.tar.bz2
dotty-442c361aee87266fe6428f1d9a5da7de934c8cef.zip
Added initial denotations to NamedType where feasible.
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r--src/dotty/tools/dotc/core/Annotations.scala4
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala2
-rw-r--r--src/dotty/tools/dotc/core/Types.scala4
-rw-r--r--src/dotty/tools/dotc/core/pickling/UnPickler.scala2
4 files changed, 5 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala
index 1a07443ea..3226e69ea 100644
--- a/src/dotty/tools/dotc/core/Annotations.scala
+++ b/src/dotty/tools/dotc/core/Annotations.scala
@@ -54,10 +54,10 @@ object Annotations {
deferred(atp.typeSymbol, New(atp, args))
def makeAlias(sym: TermSymbol)(implicit ctx: Context) =
- apply(defn.AliasAnnot, List(Ident(TermRef(sym.owner.thisType, sym.name, sym.signature))))
+ apply(defn.AliasAnnot, List(Ident(TermRef(sym.owner.thisType, sym.name, sym.signature).withDenot(sym))))
def makeChild(sym: Symbol)(implicit ctx: Context) =
- apply(defn.ChildAnnot.typeConstructor.appliedTo(NamedType(sym.owner.thisType, sym.name)), Nil)
+ apply(defn.ChildAnnot.typeConstructor.appliedTo(NamedType(sym.owner.thisType, sym.name).withDenot(sym)), Nil)
}
def ThrowsAnnotation(cls: ClassSymbol)(implicit ctx: Context) =
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index 0e439cb5f..d040fc998 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -148,7 +148,7 @@ trait Symbols { this: Context =>
newModuleSymbol(
owner, name, modFlags, clsFlags,
(module, modcls) => ClassInfo(
- owner.thisType, modcls, parents, decls, TermRef(owner.thisType, name, module)),
+ owner.thisType, modcls, parents, decls, TermRef(owner.thisType, module)),
privateWithin, coord, assocFile)
/** Create a package symbol with associated package class
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index b436a4c11..bcc2da498 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -1043,9 +1043,7 @@ object Types {
def apply(prefix: Type, name: TermName)(implicit ctx: Context): TermRef =
unique(new CachedTermRef(prefix, name))
def apply(prefix: Type, sym: TermSymbol)(implicit ctx: Context): TermRefBySym =
- apply(prefix, sym.name, sym)
- def apply(prefix: Type, name: TermName, sym: TermSymbol)(implicit ctx: Context): TermRefBySym =
- unique(new TermRefBySym(prefix, name, sym))
+ unique(new TermRefBySym(prefix, sym.name, sym))
def apply(prefix: Type, name: TermName, sig: Signature)(implicit ctx: Context): TermRefWithSignature =
unique(new TermRefWithSignature(prefix, name, sig))
}
diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
index f2cd78e35..1e272e894 100644
--- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
@@ -604,7 +604,7 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot:
val pre = readTypeRef()
val sym = readDisambiguatedSymbolRef(_.isParameterless)
if (isLocal(sym)) TermRef(pre, sym.asTerm)
- else TermRef(pre, sym.name.asTermName, NotAMethod)
+ else TermRef(pre, sym.name.asTermName, NotAMethod).withDenot(sym)
case SUPERtpe =>
val thistpe = readTypeRef()
val supertpe = readTypeRef()