summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-04-21 23:39:16 +0300
committerEugene Burmako <xeno.by@gmail.com>2014-04-21 23:39:16 +0300
commit2d37cc0b846a0ba50eb534c2a7379efd95f72ebc (patch)
tree6f534fefa0eba76ee3223fac2117dcb7c306d0ec /src
parent969e22f601d18c76ffbe22d994948874c60ebec0 (diff)
downloadscala-2d37cc0b846a0ba50eb534c2a7379efd95f72ebc.tar.gz
scala-2d37cc0b846a0ba50eb534c2a7379efd95f72ebc.tar.bz2
scala-2d37cc0b846a0ba50eb534c2a7379efd95f72ebc.zip
makes bundles friendly to -Ywarn-dead-code
Apparently, the `new Bundle(???).impl` synthetic tree generated as a macro impl ref for bundles evokes -Ywarn-dead-code warnings. This pull requests changes `???` to `null` in order not to stress out the checker. What's in the argument doesn't actually make any difference anyway.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala b/src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala
index 1413065a27..a13a778b2f 100644
--- a/src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala
+++ b/src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala
@@ -53,7 +53,7 @@ abstract class DefaultMacroCompiler extends Resolvers
(EmptyTree, TermName(""), Nil)
}
val bundleImplRef = MacroImplRefCompiler(
- atPos(macroDdef.rhs.pos)(gen.mkTypeApply(Select(New(maybeBundleRef, List(List(Ident(Predef_???)))), methName), targs)),
+ atPos(macroDdef.rhs.pos)(gen.mkTypeApply(Select(New(maybeBundleRef, List(List(Literal(Constant(null))))), methName), targs)),
isImplBundle = true
)
val vanillaResult = tryCompile(vanillaImplRef)