summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Macros.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Macros.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Macros.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Macros.scala b/src/compiler/scala/tools/nsc/typechecker/Macros.scala
index 1deb74640c..0d46a96b81 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Macros.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Macros.scala
@@ -260,7 +260,11 @@ trait Macros extends FastTrack with MacroRuntimes with Traces with Helpers {
}
def isBlackbox(expandee: Tree): Boolean = isBlackbox(dissectApplied(expandee).core.symbol)
- def isBlackbox(macroDef: Symbol): Boolean = loadMacroImplBinding(macroDef).map(_.isBlackbox).getOrElse(false)
+ def isBlackbox(macroDef: Symbol): Boolean = {
+ val fastTrackBoxity = fastTrack.get(macroDef).map(_.isBlackbox)
+ val bindingBoxity = loadMacroImplBinding(macroDef).map(_.isBlackbox)
+ fastTrackBoxity orElse bindingBoxity getOrElse false
+ }
def computeMacroDefTypeFromMacroImplRef(macroDdef: DefDef, macroImplRef: Tree): Type = {
macroImplRef match {
@@ -634,7 +638,7 @@ trait Macros extends FastTrack with MacroRuntimes with Traces with Helpers {
}
if (isBlackbox(expandee)) {
- val expanded1 = atPos(enclosingMacroPosition.focus)(Typed(expanded0, TypeTree(innerPt)))
+ val expanded1 = atPos(enclosingMacroPosition.makeTransparent)(Typed(expanded0, TypeTree(innerPt)))
typecheck("blackbox typecheck", expanded1, outerPt)
} else {
val expanded1 = expanded0