summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@gmail.com>2012-10-25 18:52:39 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-12-02 21:26:48 +0100
commitd9928d59f9b21265f783fe781ad1d3a4ff93bb6e (patch)
tree995882a03b32c19ae015e515ca3336372fe0973d /src
parentf16f4ab157293ac6860d4b00578b983c90b8fc62 (diff)
downloadscala-d9928d59f9b21265f783fe781ad1d3a4ff93bb6e.tar.gz
scala-d9928d59f9b21265f783fe781ad1d3a4ff93bb6e.tar.bz2
scala-d9928d59f9b21265f783fe781ad1d3a4ff93bb6e.zip
Fixes SI-6558: typecheck lazy annotation info using non-silent context.
Make context for typing lazy annotations always non-silent. If lazy annotation info was created in local (silent) context, error could go unnoticed because later they would still use silent typer for typing the annotation.
Diffstat (limited to 'src')
-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 36edd46f25..193c2bc76e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -1260,7 +1260,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