summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Namers.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2012-12-10 14:18:48 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2012-12-10 14:18:48 -0800
commit38b92224536b5d6619364c8266232569b12f6a26 (patch)
tree2a29b8d4525d8e21a8ff9d617e8fee612f695bf0 /src/compiler/scala/tools/nsc/typechecker/Namers.scala
parent22e0e3b22c9667c3cee63a5cfcae14f245eac51a (diff)
parent673bc700fc32fa18941554533dfd31bf2523d45e (diff)
downloadscala-38b92224536b5d6619364c8266232569b12f6a26.tar.gz
scala-38b92224536b5d6619364c8266232569b12f6a26.tar.bz2
scala-38b92224536b5d6619364c8266232569b12f6a26.zip
Merge pull request #1691 from retronym/ticket/6558
SI-6558: typecheck lazy annotation info using non-silent context
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index fa9a4ba9ea..3f546c9a51 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -1255,7 +1255,11 @@ trait Namers extends MethodSynthesis {
case defn: MemberDef =>
val ainfos = defn.mods.annotations filterNot (_ eq null) map { ann =>
// need to be lazy, #1782. beforeTyper to allow inferView in annotation args, SI-5892.
- AnnotationInfo lazily beforeTyper(typer typedAnnotation ann)
+ AnnotationInfo lazily {
+ val context1 = typer.context.make(ann)
+ context1.setReportErrors()
+ beforeTyper(newTyper(context1) typedAnnotation ann)
+ }
}
if (ainfos.nonEmpty) {
annotated setAnnotations ainfos