diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-04-21 23:39:16 +0300 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-04-21 23:39:16 +0300 |
commit | 2d37cc0b846a0ba50eb534c2a7379efd95f72ebc (patch) | |
tree | 6f534fefa0eba76ee3223fac2117dcb7c306d0ec /src/compiler/scala/reflect/macros | |
parent | 969e22f601d18c76ffbe22d994948874c60ebec0 (diff) | |
download | scala-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/compiler/scala/reflect/macros')
-rw-r--r-- | src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala | 2 |
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) |