mirror of https://github.com/sbt/sbt.git
Work around "a pure expression does nothing" warning, take 3
Fixes https://github.com/sbt/sbt/issues/6161 Ref https://github.com/scala/bug/issues/12112 This uses the configurable warning backported to Scala 2.12.
This commit is contained in:
parent
ff6cbf2e1f
commit
9cd4c0d05f
|
|
@ -201,7 +201,8 @@ object Instance {
|
|||
val tx = util.transformWrappers(tree, (n, tpe, t, replace) => sub(n, tpe, t, replace))
|
||||
// resetting attributes must be: a) local b) done here and not wider or else there are obscure errors
|
||||
val tr = makeApp(inner(tx))
|
||||
c.Expr[i.M[N[T]]](tr)
|
||||
val noWarn = q"""($tr: @scala.annotation.nowarn("cat=other-pure-statement"))"""
|
||||
c.Expr[i.M[N[T]]](noWarn)
|
||||
}
|
||||
|
||||
import Types._
|
||||
|
|
|
|||
Loading…
Reference in New Issue