diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-06-28 12:15:28 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-06-28 14:24:44 -0700 |
commit | a106df12c642ed44a72d28b893f6b320e8873bcc (patch) | |
tree | d365a00c74b79103047e88b035802f9e29007b9b /src/compiler | |
parent | e320a920d4c32752157cf73be5a5fbbd3b9cc6e7 (diff) | |
parent | 54cb6af7dbcf630a4f57e98f0099d77dd3b36693 (diff) | |
download | scala-a106df12c642ed44a72d28b893f6b320e8873bcc.tar.gz scala-a106df12c642ed44a72d28b893f6b320e8873bcc.tar.bz2 scala-a106df12c642ed44a72d28b893f6b320e8873bcc.zip |
Merge 2.10.x into master
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Namers.scala
src/partest/scala/tools/partest/PartestTask.scala
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 0305aab844..1282cfb416 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1408,11 +1408,20 @@ trait Namers extends MethodSynthesis { if (!annotated.isInitialized) tree match { case defn: MemberDef => val ainfos = defn.mods.annotations filterNot (_ eq null) map { ann => + val ctx = typer.context + val annCtx = ctx.make(ann) + annCtx.setReportErrors() // need to be lazy, #1782. beforeTyper to allow inferView in annotation args, SI-5892. AnnotationInfo lazily { - val context1 = typer.context.make(ann) - context1.setReportErrors() - enteringTyper(newTyper(context1) typedAnnotation ann) + if (typer.context ne ctx) + log(sm"""|The var `typer.context` in ${Namer.this} was mutated before the annotation ${ann} was forced. + | + |current value = ${typer.context} + |original value = $ctx + | + |This confirms the hypothesis for the cause of SI-7603. If you see this message, please comment on that ticket.""") + + enteringTyper(newTyper(annCtx) typedAnnotation ann) } } if (ainfos.nonEmpty) { |