scala/scala — pull request #3183 by xeno-by (2013-11-22 21:13:57+00:00)
Title: SI-8001 spurious "pure expression does nothing" warning

`isPureExprForWarningPurposes` doesn’t warn on `()`, but `(): Unit`
leaves it confused. This patch fixes the problem.

The fix is important in the context of the recent split between blackbox
and whitebox macros. Macro engines wrap expansions of blackbox macros
in type ascriptions, so a macro that expands into `()` would actually
produce `(): Unit`, which would trigger a spurious warning. Thanks
@milessabin for spotting this problem!