diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-24 18:04:22 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-24 18:09:01 +0200 |
commit | aa7a0399ad5424dd5292f2f1941c7293c16d6b79 (patch) | |
tree | fcc3efccc01f6d5160774c0b3998481f2d492500 /src/dotty/tools/dotc/core/Annotations.scala | |
parent | 70abd73e9306eca3ec4de1d98b877e4fafe66ad0 (diff) | |
download | dotty-aa7a0399ad5424dd5292f2f1941c7293c16d6b79.tar.gz dotty-aa7a0399ad5424dd5292f2f1941c7293c16d6b79.tar.bz2 dotty-aa7a0399ad5424dd5292f2f1941c7293c16d6b79.zip |
Check that idents don't assume magic.
In TreeChecker, make sure that every identifier has a type with an elidable prefix.
This excludes identifiers pointing to members of random prefixes without making the
prefix explicit in the tree as part of a Select node.
Diffstat (limited to 'src/dotty/tools/dotc/core/Annotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Annotations.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala index c61c46858..92b28a193 100644 --- a/src/dotty/tools/dotc/core/Annotations.scala +++ b/src/dotty/tools/dotc/core/Annotations.scala @@ -68,7 +68,8 @@ object Annotations { deferred(atp.classSymbol, implicit ctx => New(atp, args)) def makeAlias(sym: TermSymbol)(implicit ctx: Context) = - apply(defn.AliasAnnot, List(Ident(TermRef.withSigAndDenot(sym.owner.thisType, sym.name, sym.signature, sym)))) + apply(defn.AliasAnnot, List( + ref(TermRef.withSigAndDenot(sym.owner.thisType, sym.name, sym.signature, sym)))) def makeChild(sym: Symbol)(implicit ctx: Context) = apply(defn.ChildAnnot.typeRef.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil) |