aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--test/test/showClass.scala2
5 files changed, 6 insertions, 8 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()
diff --git a/test/test/showClass.scala b/test/test/showClass.scala
index d38432e21..f0dffde77 100644
--- a/test/test/showClass.scala
+++ b/test/test/showClass.scala
@@ -12,6 +12,6 @@ object showClass extends ShowClassTests {
showPackage("dotty")
showPackage("scala")
- println("done")
+ println("done")
}
}