summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-06-16 14:47:26 -0400
committerJason Zaugg <jzaugg@gmail.com>2013-06-16 17:11:07 -0400
commit9f2b2894ba2b45135943e943d13898aefc333cc2 (patch)
tree4221d0b7e9f756cae01a4cf8f3703be105ca94fa /src/reflect
parent83ae74ce9d3ff56c47b39e44332daa3da2981133 (diff)
downloadscala-9f2b2894ba2b45135943e943d13898aefc333cc2.tar.gz
scala-9f2b2894ba2b45135943e943d13898aefc333cc2.tar.bz2
scala-9f2b2894ba2b45135943e943d13898aefc333cc2.zip
SI-7584 Test and spurious warning fix for by-name closures
The enclosed test case exercises by-name closures, which were the subject of the previous commit. In the process, a spurious warning was eliminated.
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/internal/TreeInfo.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/TreeInfo.scala b/src/reflect/scala/reflect/internal/TreeInfo.scala
index a5cf46071f..cd1f5f2e47 100644
--- a/src/reflect/scala/reflect/internal/TreeInfo.scala
+++ b/src/reflect/scala/reflect/internal/TreeInfo.scala
@@ -208,7 +208,7 @@ abstract class TreeInfo {
}
def isWarnableSymbol = {
val sym = tree.symbol
- (sym == null) || !(sym.isModule || sym.isLazy) || {
+ (sym == null) || !(sym.isModule || sym.isLazy || definitions.isByNameParamType(sym.tpe_*)) || {
debuglog("'Pure' but side-effecting expression in statement position: " + tree)
false
}