summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-06-28 12:15:28 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-06-28 14:24:44 -0700
commita106df12c642ed44a72d28b893f6b320e8873bcc (patch)
treed365a00c74b79103047e88b035802f9e29007b9b /src
parente320a920d4c32752157cf73be5a5fbbd3b9cc6e7 (diff)
parent54cb6af7dbcf630a4f57e98f0099d77dd3b36693 (diff)
downloadscala-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')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala15
-rw-r--r--src/partest/scala/tools/partest/PartestTask.scala5
2 files changed, 15 insertions, 5 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) {
diff --git a/src/partest/scala/tools/partest/PartestTask.scala b/src/partest/scala/tools/partest/PartestTask.scala
index b5b09a753a..8b88021dbf 100644
--- a/src/partest/scala/tools/partest/PartestTask.scala
+++ b/src/partest/scala/tools/partest/PartestTask.scala
@@ -15,6 +15,7 @@ import java.lang.reflect.Method
import org.apache.tools.ant.Task
import org.apache.tools.ant.types.{ Reference, FileSet}
import org.apache.tools.ant.types.Commandline.Argument
+import scala.tools.ant.ScalaTask
/** An Ant task to execute the Scala test suite (NSC).
*
@@ -34,7 +35,7 @@ import org.apache.tools.ant.types.Commandline.Argument
*
* @author Philippe Haller
*/
-class PartestTask extends Task with CompilationPathProperty {
+class PartestTask extends Task with CompilationPathProperty with ScalaTask {
type Path = org.apache.tools.ant.types.Path
private var kinds: List[String] = Nil
@@ -178,7 +179,7 @@ class PartestTask extends Task with CompilationPathProperty {
val allFailures = _results map (_._2) sum
val allFailedPaths = _results flatMap (_._3)
- def f = if (errorOnFailed && allFailures > 0) (sys error _) else log(_: String)
+ def f = if (errorOnFailed && allFailures > 0) buildError(_: String) else log(_: String)
def s = if (allFailures > 1) "s" else ""
val msg =
if (allFailures > 0)