aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
authorDmitry Petrashko <dark@d-d.me>2014-04-09 16:36:58 +0200
committerDmitry Petrashko <dark@d-d.me>2014-04-09 16:36:58 +0200
commit37502919ab964e7a3dc0ca79daf2a7f83747e434 (patch)
treeead93ea42ce0fe76667e6d3850f91e8ae1f2e2d6 /src/dotty/tools/dotc/core
parent6bc463df6a6ea8312390915a65024b11cfdd2b77 (diff)
parent01c33eea19d95fe625ba0b52291f4ab043d883fc (diff)
downloaddotty-37502919ab964e7a3dc0ca79daf2a7f83747e434.tar.gz
dotty-37502919ab964e7a3dc0ca79daf2a7f83747e434.tar.bz2
dotty-37502919ab964e7a3dc0ca79daf2a7f83747e434.zip
Merge pull request #118 from dotty-staging/fix/annotations
Fixing annotations
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r--src/dotty/tools/dotc/core/Annotations.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala
index 947593ca4..b4b7ebd24 100644
--- a/src/dotty/tools/dotc/core/Annotations.scala
+++ b/src/dotty/tools/dotc/core/Annotations.scala
@@ -7,7 +7,9 @@ object Annotations {
abstract class Annotation {
def tree(implicit ctx: Context): Tree
- def symbol(implicit ctx: Context): Symbol = tree.tpe.typeSymbol
+ def symbol(implicit ctx: Context): Symbol =
+ if (tree.symbol.isConstructor) tree.symbol.owner
+ else tree.tpe.typeSymbol
def matches(cls: Symbol)(implicit ctx: Context): Boolean = symbol.derivesFrom(cls)
def appliesToModule: Boolean = true // for now; see remark in SymDenotations