aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-12-01 14:01:37 +0100
committerMartin Odersky <odersky@gmail.com>2016-12-01 14:01:37 +0100
commite1d79a280c16083db309be02f911e326ef205f2c (patch)
tree8c25c6e24257f90489352dc2bee691c9d1a24883 /compiler/src/dotty/tools/dotc/typer/Typer.scala
parent9a3f82c69a1c2912fc8a15e580dedcf9683eae3c (diff)
downloaddotty-e1d79a280c16083db309be02f911e326ef205f2c.tar.gz
dotty-e1d79a280c16083db309be02f911e326ef205f2c.tar.bz2
dotty-e1d79a280c16083db309be02f911e326ef205f2c.zip
Address reviewers comments
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Typer.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala
index 263ebacd7..4ec1c460f 100644
--- a/compiler/src/dotty/tools/dotc/typer/Typer.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1138,7 +1138,11 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
lazy val annotCtx = {
val c = ctx.outersIterator.dropWhile(_.owner == sym).next
c.property(ExprOwner) match {
- case Some(exprOwner) if c.owner.isClass => c.exprContext(mdef, exprOwner)
+ case Some(exprOwner) if c.owner.isClass =>
+ // We need to evaluate annotation arguments in an expression context, since
+ // classes defined in a such arguments should not be entered into the
+ // enclosing class.
+ c.exprContext(mdef, exprOwner)
case None => c
}
}