From 2d37cc0b846a0ba50eb534c2a7379efd95f72ebc Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Mon, 21 Apr 2014 23:39:16 +0300 Subject: 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. --- src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler') 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) -- cgit v1.2.3