summaryrefslogtreecommitdiff
path: root/src/compiler/scala/reflect/reify
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-02-07 13:27:49 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-02-07 13:27:49 +0100
commit60154183002f66a7aa96dc3515ccd9ecc1b5a3dd (patch)
treed3a1e49f1cb0dab4270fb7cb3c48ddacdb07f8e5 /src/compiler/scala/reflect/reify
parentb6326af94d255cb96b997680baec5ae38c4db4c7 (diff)
downloadscala-60154183002f66a7aa96dc3515ccd9ecc1b5a3dd.tar.gz
scala-60154183002f66a7aa96dc3515ccd9ecc1b5a3dd.tar.bz2
scala-60154183002f66a7aa96dc3515ccd9ecc1b5a3dd.zip
does away with resetAllAttrs in the reifier
resetLocalAttrs works just fine there
Diffstat (limited to 'src/compiler/scala/reflect/reify')
-rw-r--r--src/compiler/scala/reflect/reify/Reifier.scala12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/compiler/scala/reflect/reify/Reifier.scala b/src/compiler/scala/reflect/reify/Reifier.scala
index 9c3acaad89..16114c7ef5 100644
--- a/src/compiler/scala/reflect/reify/Reifier.scala
+++ b/src/compiler/scala/reflect/reify/Reifier.scala
@@ -109,19 +109,11 @@ abstract class Reifier extends States
//
// todo. this is a common problem with non-trivial macros in our current macro system
// needs to be solved some day
- // maybe try `resetLocalAttrs` once the dust settles
- var importantSymbols = Set[Symbol](
- NothingClass, AnyClass, SingletonClass, PredefModule, ScalaRunTimeModule, TypeCreatorClass, TreeCreatorClass, MirrorClass,
- ApiUniverseClass, JavaUniverseClass, ReflectRuntimePackage, runDefinitions.ReflectRuntimeCurrentMirror)
- importantSymbols ++= importantSymbols map (_.companionSymbol)
- importantSymbols ++= importantSymbols map (_.moduleClass)
- importantSymbols ++= importantSymbols map (_.linkedClassOfClass)
- def isImportantSymbol(sym: Symbol): Boolean = sym != null && sym != NoSymbol && importantSymbols(sym)
- val untyped = resetAllAttrs(result, leaveAlone = {
+ // upd. a new hope: https://groups.google.com/forum/#!topic/scala-internals/TtCTPlj_qcQ
+ val untyped = resetLocalAttrs(result, leaveAlone = {
case ValDef(_, u, _, _) if u == nme.UNIVERSE_SHORT => true
case ValDef(_, m, _, _) if m == nme.MIRROR_SHORT => true
case tree if symtab.syms contains tree.symbol => true
- case tree if isImportantSymbol(tree.symbol) => true
case _ => false
})