summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-07-08 20:40:08 +0200
committerEugene Burmako <xeno.by@gmail.com>2013-07-08 21:20:28 +0200
commit17719231c615c06eb83f4109f53bfdd948a6fdb1 (patch)
tree5cf71d6938d46d37dfc0892fe9dd004eac9888e0 /src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
parent7184fe0d3740ac8558067c18bdf449a65a8a26b9 (diff)
downloadscala-17719231c615c06eb83f4109f53bfdd948a6fdb1.tar.gz
scala-17719231c615c06eb83f4109f53bfdd948a6fdb1.tar.bz2
scala-17719231c615c06eb83f4109f53bfdd948a6fdb1.zip
introduces unapply macros for internal use
Adds a macro hook into the unapply part of `doTypedApply`, provides `macroExpandUnapply` in the macro engine and applies a couple of minor refactorings along the way (renames the ugly `macroExpand1` into oblivion, changes the ctor of `Fingerprint` to be private and upgrades `MacroRole` from a string to a value class). Unapply macros haven't been approved for inclusion in 2.11.0, however they are necessary for pattern-matching quasiquotes. Therefore I'm only allowing them to expand for QuasiquoteClass_api_unapply.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
index a3ab948171..f2a77b4333 100644
--- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
@@ -741,7 +741,7 @@ trait ContextErrors {
try {
// [Eugene] is there a better way?
// [Paul] See Exceptional.scala and Origins.scala.
- val relevancyThreshold = realex.getStackTrace().indexWhere(_.getMethodName endsWith "macroExpand1")
+ val relevancyThreshold = realex.getStackTrace().indexWhere(_.getMethodName endsWith "macroExpandWithRuntime")
if (relevancyThreshold == -1) None
else {
var relevantElements = realex.getStackTrace().take(relevancyThreshold + 1)