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 /test/files | |
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 'test/files')
-rw-r--r-- | test/files/pos/t8523.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t8523.scala | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/t8523.flags b/test/files/pos/t8523.flags new file mode 100644 index 0000000000..c7d406c649 --- /dev/null +++ b/test/files/pos/t8523.flags @@ -0,0 +1 @@ +-Ywarn-dead-code -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t8523.scala b/test/files/pos/t8523.scala new file mode 100644 index 0000000000..dfcb35404d --- /dev/null +++ b/test/files/pos/t8523.scala @@ -0,0 +1,10 @@ +import scala.language.experimental.macros +import scala.reflect.macros.blackbox.Context + +class Impl(val c: Context) { + def impl: c.Tree = ??? +} + +object Macros { + def foo: Any = macro Impl.impl +}
\ No newline at end of file |