Merge pull request #6363 from eed3si9n/wip/nowarn

Work around "a pure expression does nothing" warning, take 3
This commit is contained in:
eugene yokota 2021-03-07 14:04:50 -05:00 committed by GitHub
commit 93fd5703b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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._